[PATCH libinput 2/3] Implement support for pen barrel rotation

Jason Gerecke killertofu at gmail.com
Mon Dec 8 19:29:52 PST 2014


My primary complaint is that "X" and "Y" are both translational axes,
and by analogy "Z" should be as well. Using it as the name for a
rotational axis just muddies things, especially when we already have
"DISTANCE". My second complaint is the same as Peter's: it should be
clear that is axis is in the tool's frame of reference. I chose
"TWIST" because it suffers from neither issue, though I admit "ROLL"
is probably the better term :)

The use of 'Z' for rotation elsewhere is mostly because other bits of
code have followed our (poor) lead. The kernel's Wacom driver has been
using ABS_Z for rotation for more than 6 years, but mostly only
because there's been no more semantically-correct axis for us to use.
Our pucks* use ABS_RZ to report their rotation angle (which is fine
since they're used parallel to the tablet), but there's nothing that
quite semantically means "rotation about the tool's Z axis" so we went
with the best option available: ABS_Z.

Speaking of the pucks... I'm assuming that when I get around to adding
them, we want to have an "RZ" (a'la HID) or "ORIENTATION" (a'la evdev
MT) axis for their rotation since it's not really about the tool's own
major axis.

Jason
---
Now instead of four in the eights place /
you’ve got three, ‘Cause you added one  /
(That is to say, eight) to the two,     /
But you can’t take seven from three,    /
So you look at the sixty-fours....


On Mon, Dec 8, 2014 at 4:12 PM, Bill Spitzak <spitzak at gmail.com> wrote:
> You are right that the fact that it is along the pen is not obvious from
> "Z". However this is actually true of "X" and "Y" (one of them could be the
> angle in the plane defined by the other tilt).
>
> Roll probably is good, but it still seems to me that Z is more common, also
> it looks like the evdev library is using "Z" from your code.
>
>
> On 12/08/2014 03:24 PM, Peter Hutterer wrote:
>>
>> On Mon, Dec 08, 2014 at 12:13:17PM -0800, Bill Spitzak wrote:
>>>
>>> Why not call it Z instead of TWIST?
>>>
>>> I'm pretty certain that is a common term for this movement, and that
>>> "twist"
>>> is a rather strange term ("roll" is used more). And Z has the advantage
>>> that
>>> it also implies that counter-clockwise is positive.
>>
>>
>> my main issue with Z is that it's not immediately clear what it refers to
>> in
>> the context of a tablet. x/y is relative to the tablet itself, not the
>> stylus, so Z could be interpreted to be the same. twist isn't though, it
>> relates to the stylus rotation regardless of tilt.
>>
>> Having said, I do like the term roll, better than twist.
>>
>> Cheers,
>>     Peter
>>
>>>
>>> On 12/08/2014 09:59 AM, Jason Gerecke wrote:
>>>
>>>> --- a/src/libinput.h
>>>> +++ b/src/libinput.h
>>>> @@ -277,7 +277,8 @@ enum libinput_tablet_axis {
>>>>         LIBINPUT_TABLET_AXIS_PRESSURE = 3,
>>>>         LIBINPUT_TABLET_AXIS_TILT_X = 4,
>>>>         LIBINPUT_TABLET_AXIS_TILT_Y = 5,
>>>> -       LIBINPUT_TABLET_AXIS_CNT = LIBINPUT_TABLET_AXIS_TILT_Y + 1
>>>> +       LIBINPUT_TABLET_AXIS_TWIST = 6,
>>>> +       LIBINPUT_TABLET_AXIS_CNT = LIBINPUT_TABLET_AXIS_TWIST + 1
>>>>   };
>>>
>>> _______________________________________________
>>> wayland-devel mailing list
>>> wayland-devel at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>>>
>


More information about the wayland-devel mailing list