[RFC v2 libinput 0/2] Buttonset interface - numbered axes
Peter Hutterer
peter.hutterer at who-t.net
Thu Mar 19 17:38:36 PDT 2015
On Fri, Mar 20, 2015 at 10:19:06AM +1000, Peter Hutterer wrote:
[...]
> > 5) If a device has multiple axes of the same type, is the order
> > supposed to be ABI? Example: gamepads tend to have two analog-sticks.
> > How do applications reliably find the left and right stick?
>
> well, our promise is that the same device will come up in the same order of
> axes. so once you figure out that the left stick is the first, you can rely
> on it always being the first on that device.
>
> if the kernel driver changes out from underneath us that could be
> interesting but then again that'd be an argument for a kernel regression :)
one clarification here:
the intention was that the axis order is fixed within the type, but may
otherwise change over time.
i.e. if you have two RING axes, they'll stay the same order but they do
_not_ always have the same axis number.
The device may have X, Y, Z, RING, RING but change to X, Y, Z, WHEEL,
RING, RING in the future. Or even X, RING, Y, RING, Z.
We only guarantee that the first ring is the same ring as before. in other
words, the axis number is _not_ ABI, it's just an index.
(This was prompted by Jason's reply re:accelerometers in the 27QHD, we may
not support them now but if they are added in the future they may slot in at
any position.)
Cheers,
Peter
More information about the wayland-devel
mailing list