The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Siarhei Vishniakou <svv@google.com>
Cc: Jiri Kosina <jikos@kernel.org>,
	 Benjamin Tissoires <bentiss@kernel.org>,
	Ping Cheng <ping.cheng@wacom.com>,
	 Jason Gerecke <jason.gerecke@wacom.com>,
	Jonathan Corbet <corbet@lwn.net>,
	 Henrik Rydberg <rydberg@bitmath.org>,
	linux-input@vger.kernel.org, linux-doc@vger.kernel.org,
	 linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3] Input: add ABS_TWIST and support it in HID and Wacom
Date: Sun, 22 Nov 2026 14:13:54 -0800	[thread overview]
Message-ID: <awNosbiWPFdsbUN5@google.com> (raw)
In-Reply-To: <CAKF84v00nJ_+2Tf8m66LhGEKvqnHb26YD6p+FRUXK5juYEPQZA@mail.gmail.com>

On Tue, Nov 10, 2026 at 10:57:31AM -0800, Siarhei Vishniakou wrote:
> пн, 9 нояб. 2026 г. в 18:25, Dmitry Torokhov <dmitry.torokhov@gmail.com>:
> >
> > Hi Siarhei,
> >
> > On Mon, Nov 09, 2026 at 06:06:29PM -0800, Siarhei Vishniakou wrote:
> > > Some styli can report rotation along their long ("barrel") axis,
> > > commonly referred to as "twist". While the HID specification defines
> > > this usage as HID_DG_TWIST (0x000d0041) in the Digitizers page, there is
> > > currently no corresponding evdev axis code to expose it to userspace.
> > >
> > > Because evdev has no MSC_SCAN equivalent for axes, drivers and OEMs
> > > currently work around this by mapping stylus twist onto unrelated axes
> > > such as ABS_Z or ABS_RZ. As a result, userspace input stacks must
> > > maintain device-specific workarounds to know which axis carries twist.
> >
> > How is it different from orientation?
> >
> > Thanks.
> >
> > --
> > Dmitry
> 
> ABS_MT_ORIENTATION describes the 2D angle of the contact ellipse (or
> tool projection) on the surface of the touchscreen. Looking strictly at that
> initial sentence in multi-touch-protocol.rst, it sounds promising:
> 
> > ABS_MT_ORIENTATION ... The value should describe a signed quarter of a
> > revolution clockwise around the touch center.
> 
> However, the rest of the section clarifies that this is the alignment of
> the contact ellipse with the X/Y axes, not the "twist" of the finger
> itself. In fact, the docs note that orientation can be omitted if the
> contact area is circular - even though a circular finger or stylus tip
> could still spin in place, and that rotation would not be conveyed.
> 
> For a stylus, orientation is equivalent to the tilt
> projected onto the touchscreen plane (which single-tool stylus drivers already
> capture via ABS_TILT_X / ABS_TILT_Y).
> By contrast, the proposed ABS_TWIST can be thought of as keeping the
> stylus at a fixed position and tilt angle, and using two fingers to roll
> it in place like a pencil.
> 
> This also matches the HID Digitizers specification, which defines
> Azimuth (0x3f, rotation of the tool projection around the surface Z
> axis) separately from Twist (0x41, clockwise rotation of the tool around
> its own major axis), and hid-multitouch already maps HID_DG_AZIMUTH to
> ABS_MT_ORIENTATION. Since styli can report tilt/azimuth and twist at the
> same time (and single-tool pen devices don't use ABS_MT_* events), twist
> needs a dedicated axis.

OK, let's add it then. But we need a more precise definition of what the
values mean (i.e. is rotation clock- or counterclockwise, only positive
or negative, what 0 means).

Can we also move it below ABS_SND_PROFILE in the doc?

Thanks.

-- 
Dmitry

      reply	other threads:[~2026-11-22 22:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10  2:06 [PATCH 0/3] Input: add ABS_TWIST and support it in HID and Wacom Siarhei Vishniakou
2026-11-10  2:06 ` [PATCH 1/3] Input: add ABS_TWIST event code Siarhei Vishniakou
2026-11-10  2:06 ` [PATCH 2/3] HID: input: map Digitizers Twist usage to ABS_TWIST Siarhei Vishniakou
2026-11-10  2:06 ` [PATCH 3/3] HID: wacom: report ABS_TWIST alongside ABS_Z for pen twist Siarhei Vishniakou
2026-11-13 23:29   ` Jason Gerecke
2026-11-10  2:25 ` [PATCH 0/3] Input: add ABS_TWIST and support it in HID and Wacom Dmitry Torokhov
2026-11-10 18:57   ` Siarhei Vishniakou
2026-11-22 22:13     ` Dmitry Torokhov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=awNosbiWPFdsbUN5@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=bentiss@kernel.org \
    --cc=corbet@lwn.net \
    --cc=jason.gerecke@wacom.com \
    --cc=jikos@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ping.cheng@wacom.com \
    --cc=rydberg@bitmath.org \
    --cc=svv@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox