Skip to content

tablet: add API for relative dials

Peter Hutterer requested to merge whot/libinput:wip/tablet-relative-dial into main

This is a lot of copy/paste from the ring axes because the interface is virtually identical. The main difference is that dials give us a v120 value in the same manner as our scroll axes.

Notes:

  • REL_DIAL is exclusive with REL_WHEEL, we assume the kernel doesn't (at this point) give us devices with both. If this changes for devices with three dials (wheel + hwheel + dial) we need to add code for that.
  • REL_DIAL does not have a high-resolution axis and we assume that any device with REL_WHEEL_HI_RES will also have REL_HWHEEL_HI_RES (if the second wheel exists).
  • It is currently unclear if any device can support actually setting the source, this may be superfluous. The kernel won't pass on a REL_DIAL of 0 so the "finger release" information would have to come from elsewhere. This is something we won't know until devices appear.

Fixes #600 (closed)

TODO:

  • add test devices from #600 (closed)
    • see #600 (comment 2261499) - this device has two event nodes (pad + dial) and it's not clear yet how this will work out in real life
  • consider dropping the dial source (see comment above), can be added in a future version if necessary
  • fix the litest suite to handle hi-res events
  • add support to the debug-gui

cc @pinglinux, @jigpu, @Joshua-Dickens, @skomra, @carlosg, @bentiss

Edited by Peter Hutterer

Merge request reports