Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp834273rdf; Fri, 3 Nov 2023 17:48:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF0eCURaGGUS6+TemFjEZgogNhv+bJ1lJiwVo3aQgkSOFr38/BQwcnjBKqpriWN/tze7Gf3 X-Received: by 2002:a0c:f1ca:0:b0:66d:28a5:d153 with SMTP id u10-20020a0cf1ca000000b0066d28a5d153mr21484406qvl.47.1699058894433; Fri, 03 Nov 2023 17:48:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699058894; cv=none; d=google.com; s=arc-20160816; b=oOgs9v3Mw/EdSBPsUoqGii41uiseQwaFN0gAkHcKZi5GA21+AC//L0jJKtuvpLqa4E dYvMI7ajvXgq1z+P1qMqlWf3diTD/cDgcQN+n1qoS+YU9zLOwgDfqwmUg7pFLRfQj59J petMSs9rqbx0N75X3Zdp1qunJu3fPhXkfWW197WcYb1GY6CWu/paiqtlvphZ83EjfDks cXTVa5jyYQiP2LnzAVn8mjxnT0oDvZO5Yl39FmqvvcFexYSPcmRMuxDZV7dqNO7oAH3y vllia/Wlw0fAszEAaAyn92qtiDRi+xZlz5jhZlQr+HNxJDXbRDSS68YoCS7d1ijW7iU3 //kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=kTmKPjcRZJist4lZxNa147OmNAqZvh+S7QiW2Uxgbjc=; fh=qQwa8Z4AtETJEctUbNybz15oCz9d65U85XzTbht2jY8=; b=xJbL/XCr6i93+MUOTCxPgdpcp+t+YPcTnTl5kJKxa5KaRJQKIlT/P2R2Z487E5xpU6 BlaEWAUPFjWUQysIBn9YSYX6jawj2zBCL+SK3gZfp3ltHgtjXxYlT6UfQxr/Ps3ULvu8 6zEz2EzoPP9bZwOf2NkTjfxnMB0CeUP3mVKyT9lRkQYbg+YFbjZSmQSae2TljjBO1+vS Ihu/zZJbhwFZ5u7K0E11RMmHOxZW1z/Hi6Drp1ifSuln6llwE11HOjiSrKXeI8YFQkYk Up9Rw9RHaNfyUh/vCjGNtJR0SNraRVYBsOM4vfnxAgb6ATmiEeuQt4U/7jmuV3u3e/Li qK3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="l/dZ/prZ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id k125-20020a636f83000000b005b8ece0ce8bsi2554842pgc.55.2023.11.03.17.48.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 17:48:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="l/dZ/prZ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 9D8AB80699E9; Fri, 3 Nov 2023 17:47:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231536AbjKDAq6 (ORCPT + 99 others); Fri, 3 Nov 2023 20:46:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229864AbjKDAq5 (ORCPT ); Fri, 3 Nov 2023 20:46:57 -0400 Received: from mail-oo1-xc34.google.com (mail-oo1-xc34.google.com [IPv6:2607:f8b0:4864:20::c34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 485E3DC; Fri, 3 Nov 2023 17:46:54 -0700 (PDT) Received: by mail-oo1-xc34.google.com with SMTP id 006d021491bc7-581edcde26cso1466211eaf.1; Fri, 03 Nov 2023 17:46:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699058813; x=1699663613; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=kTmKPjcRZJist4lZxNa147OmNAqZvh+S7QiW2Uxgbjc=; b=l/dZ/prZDhu5ZxCaaK7MNEriHndlLxBzIiyqrY7Jm6den9u/gkHd/CYcSKCXfsBZem G5SrJgz8IkB+4oZI1WluKt+q6apq7piq4I8ctndPtg3S/ieWSSFHfRKNR1prZp/lyMYB jKwptS2iPA2rpl9TReQ986WuZsto27iEYzJIvBdL626mcVEp5rndRFHeVMohmNln2XLl p1XRS4BsNAuwoiP6WTpQfkJriVYQqKwqgd0cSwbySCkFzO7I4shV9yATG33v+DIpfHR1 4bv3OQhrG7LLgRlXolp43CQnGKnRpaO+fhum3E2CqX2Lpg2vj3XhCoi1Wa0DwGJJ58JY 7nZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699058813; x=1699663613; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=kTmKPjcRZJist4lZxNa147OmNAqZvh+S7QiW2Uxgbjc=; b=Wily4vMvYS07MQuK2W5auFaoEdIvAdG+1Moy3L9JGFbhY/HyC+xuHJME4hpCBaR/+L l5pYh0+lf/LH+uR3Ogmw3gK0Fb80TrzPc5gxHVySPfzFu5R0UaTA1l+8VWG57gbneFi0 1ZsScq9oyqZE0tdQnDT/c51u7MR5Vz2GIi/5iGoteK5q1KXN2pcGipGWjkEQ4Aoo0Epg sVKRHSylnR9sYQAPnC2EsIgAnZ1OM7pZDglCZqfpCY1/BZ58wW4RVrUceFWNFCNpEjkx MVvgrLd0OQYE1vZYV2VJbU6Fn/x/FTLl3L+0plfI9o4/xUcKabtmZQmdhcu8uGcRTm9L fdQQ== X-Gm-Message-State: AOJu0Yw8u0iFlFrnJ8JOQOcmSPyb+Jtvn5/Mwcj88jdz0dl9sGAIVYVu A5srrBSVjLVbgeRA1QaUFUM= X-Received: by 2002:a05:6358:903:b0:168:dc03:5b90 with SMTP id r3-20020a056358090300b00168dc035b90mr31425074rwi.23.1699058813362; Fri, 03 Nov 2023 17:46:53 -0700 (PDT) Received: from debian.me ([103.131.18.64]) by smtp.gmail.com with ESMTPSA id 9-20020a17090a018900b00280469602bcsm2183224pjc.2.2023.11.03.17.46.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 17:46:52 -0700 (PDT) Received: by debian.me (Postfix, from userid 1000) id C00A1803A590; Sat, 4 Nov 2023 07:46:48 +0700 (WIB) Date: Sat, 4 Nov 2023 07:46:48 +0700 From: Bagas Sanjaya To: Illia Ostapyshyn , jkosina@suse.cz Cc: benjamin.tissoires@redhat.com, davidrevoy@protonmail.com, jason.gerecke@wacom.com, jose.exposito89@gmail.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, nils@nilsfuhler.de, peter.hutterer@who-t.net, ping.cheng@wacom.com Subject: Re: Requesting your attention and expertise regarding a Tablet/Kernel issue Message-ID: References: <20231103200524.53930-1-ostapyshyn@sra.uni-hannover.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="GPUkFEtqwjEqRlrq" Content-Disposition: inline In-Reply-To: <20231103200524.53930-1-ostapyshyn@sra.uni-hannover.de> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 03 Nov 2023 17:47:01 -0700 (PDT) --GPUkFEtqwjEqRlrq Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 03, 2023 at 09:05:25PM +0100, Illia Ostapyshyn wrote: > Hello David, Hello Jiri, >=20 > The XP-Pen hardware reports the Eraser usage for the upper stylus button. > Generally, styli report Invert usages when erasing, as described in [1]. > XP-Pen digitizers, however, tend to omit them. >=20 > The generic driver maps the Eraser usage to BTN_TOUCH and the Invert > usage to BTN_TOOL_RUBBER. Pens conforming to [1] send the Invert usage > first (switching the tool to BTN_TOOL_RUBBER) followed by Eraser, which > appears in userspace as a BTN_TOUCH event with the rubber tool set. >=20 > Due to an oversight, devices not reporting Invert had the BTN_TOOL_RUBBER > event masked. This has caused the kernel to send only BTN_TOUCH events > without the tool switch when erasing. >=20 > The situation got worse with refactoring done in 87562fcd1342. An eraser > without Invert caused the hidinput_hid_event state machine to get stuck > with BTN_TOOL_RUBBER internally (due to it being masked). For the > userspace, this looked as if the pen was never hovering again, rendering > it unusable until the next reset. 276e14e6c3 fixes this by adding > support for digitizers that do not report Invert usages when erasing. >=20 > --- >=20 > David, we are sorry that our patch broke your workflow. However, > forwarding hardware events *as-is* to the userspace has always been the > intended behavior, with a kernel bug preventing it so far. You can still > remap the eraser button to a right click using xsetwacom: >=20 > xsetwacom set "UGTABLET 24 inch PenDisplay eraser" "Button" "1" "3" >=20 > Replace the device name with the corresponding *eraser* device from > "xsetwacom list devices". You can also do this with "xinput set-button-m= ap", > which works for libinput as well. We have tested this with several > XP-Pen devices, including Artist 24. >=20 > [1] https://learn.microsoft.com/en-us/windows-hardware/design/component-g= uidelines/windows-pen-states Thanks for the explanation! --=20 An old man doll... just what I always wanted! - Clara --GPUkFEtqwjEqRlrq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSSYQ6Cy7oyFNCHrUH2uYlJVVFOowUCZUWUcwAKCRD2uYlJVVFO o7foAQD9gE01APXiONGlCkh8yPLpMWJGLXm/0vOpOjVeITU34QEA5B4nwPEHixv4 t6bPBwtMOmcY02/OpcpxAZIdWNIrQQg= =wMbT -----END PGP SIGNATURE----- --GPUkFEtqwjEqRlrq--