libinput/tools
Peter Hutterer 6bb02aaf30 High-resolution scroll wheel support
Starting with kernel v5.0 two new axes are available for high-resolution wheel
scrolling: REL_WHEEL_HI_RES and REL_HWHEEL_HI_RES. Both axes send data in
fractions of 120 where each multiple of 120 amounts to one logical scroll
event. Fractions of 120 indicate a wheel movement less than one detent.

This commit adds a new API for scroll events. Three new event types that encode
the axis source in the event type name and a new API to get a normalized-to-120
value that also used by Windows and the kernel (each multiple of 120 represents
a logical scroll click).

This addresses a main shortcoming with the existing API - it was unreliable to
calculate the click angle based on the axis value+discrete events and thus any
caller using the axis value alone would be left with some ambiguity. With the
v120 API it's now possible to (usually) calculate the click angle, but more
importantly it provides the simplest hw-independent way of scrolling by a
click or a fraction of a click.

A new event type is required, the only way to integrate the v120 value
otherwise was to start sending events with a discrete value of 0. This
would break existing xf86-input-libinput (divide by zero, fixed in 0.28.2) and
weston (general confusion). mutter, kwin are unaffected.

With the new API, the old POINTER_AXIS event are deprecated - callers should use
the new API where available and discard any POINTER_AXIS events.

Notable: REL_WHEEL/REL_HWHEEL are emulated by the kernel but there's no
guarantee that they'll come every accumulated 120 values, e.g. Logitech mice
often send events that don't add up to 120 per detent.

We use the kernel's wheel click emulation instead of doing our own.

libinput guarantees high-resolution events even on pre-5.0 kernels.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2021-08-31 08:45:01 +02:00
..
libinput-analyze-per-slot-delta.man tools: per-slot-delta: add arguments to set a threshold and ignore-below 2020-04-11 14:35:27 +10:00
libinput-analyze-per-slot-delta.py tools/per-slot-delta: handle KeyboardInterrupts nicely 2021-03-10 00:24:51 +00:00
libinput-analyze-recording.man tools: add a tool to print a libinput recording as a table 2021-02-23 13:46:00 +10:00
libinput-analyze-recording.py tools: add a tool to print a libinput recording as a table 2021-02-23 13:46:00 +10:00
libinput-analyze-touch-down-state.man tools: add a tool to analyze the finger count from a recording 2021-01-29 08:06:53 +10:00
libinput-analyze-touch-down-state.py tools: add a tool to analyze the finger count from a recording 2021-01-29 08:06:53 +10:00
libinput-analyze.c tools: add a libinput analyze command with the per-slot-delta subcommand 2020-03-16 08:35:43 +10:00
libinput-analyze.man tools: add a tool to print a libinput recording as a table 2021-02-23 13:46:00 +10:00
libinput-debug-events.c High-resolution scroll wheel support 2021-08-31 08:45:01 +02:00
libinput-debug-events.man tools: fix typo in debug-events man page 2020-01-31 17:28:15 +10:00
libinput-debug-gui.c High-resolution scroll wheel support 2021-08-31 08:45:01 +02:00
libinput-debug-gui.man tools/debug-gui: draw a sprite for the unaccelerated pointer as well 2021-03-11 10:40:00 +10:00
libinput-debug-tablet.c Mark some functions as printf-like to silence some compiler warnings 2021-07-22 23:14:43 +00:00
libinput-debug-tablet.man tools: add a tablet debugging tool 2019-11-19 09:56:14 +10:00
libinput-list-devices.c [clang-tidy] do not use else after return 2020-08-27 01:17:24 -07:00
libinput-list-devices.man libinput-list-devices: make paragraph about different settings terser 2019-10-28 05:40:02 +00:00
libinput-measure-fuzz.man touchpad: add a tool to measure the touchpad fuzz 2018-05-15 13:51:33 +10:00
libinput-measure-fuzz.py Use python black for all pyhon file formatting 2021-01-28 21:02:45 +00:00
libinput-measure-touch-size.man tools: touch-size: update to use the device quirks 2018-06-21 11:48:41 +10:00
libinput-measure-touch-size.py Use python black for all pyhon file formatting 2021-01-28 21:02:45 +00:00
libinput-measure-touchpad-pressure.man tools: make the thumb threshold configurable while measuring pressure 2020-03-30 14:45:19 +10:00
libinput-measure-touchpad-pressure.py Use python black for all pyhon file formatting 2021-01-28 21:02:45 +00:00
libinput-measure-touchpad-size.man treewide: fix typos 2020-12-16 22:08:23 +01:00
libinput-measure-touchpad-size.py Use python black for all pyhon file formatting 2021-01-28 21:02:45 +00:00
libinput-measure-touchpad-tap.man treewide: fix typos 2020-12-16 22:08:23 +01:00
libinput-measure-touchpad-tap.py Use python black for all pyhon file formatting 2021-01-28 21:02:45 +00:00
libinput-measure.c libinput-measure.c: remove unused includes 2019-09-13 00:07:39 +03:00
libinput-measure.man tools: add a measure touchpad-size tool 2020-03-30 15:14:45 +10:00
libinput-quirks.c Mark some functions as printf-like to silence some compiler warnings 2021-07-22 23:14:43 +00:00
libinput-quirks.man tools: rename list-quirks to the more generic "quirks list" 2018-07-03 15:16:59 +10:00
libinput-record-verify-yaml.py Use python black for all pyhon file formatting 2021-01-28 21:02:45 +00:00
libinput-record.c Silence compiler warnings for -Wformat-nonliteral 2021-07-22 23:14:43 +00:00
libinput-record.man tools/record: add support for hidraw recording 2021-05-05 03:59:34 +00:00
libinput-replay.man tools/replay: do not replay key repeat events 2021-05-18 23:14:44 +00:00
libinput-replay.py tools/replay: do not replay key repeat events 2021-05-18 23:14:44 +00:00
libinput-tool.c tools: add libinput analyze to the libinput tool help output 2020-03-29 15:33:24 +10:00
libinput.man man: install the analyze per-slot-delta man page 2020-03-20 16:10:11 +10:00
make-ptraccel-graphs.sh tools: make-ptraccel-graphs: drop an unnecessary outfile 2018-07-11 16:04:59 +10:00
ptraccel-debug.c Add quirk to control velocity averaging, disable it by default 2018-08-22 12:12:55 +02:00
shared.c quirks: Add tablet smoothing attribute. 2021-07-28 23:53:36 +00:00
shared.h tools: print the libinput_dispatch() counter for debugging messages 2020-10-06 16:12:17 +10:00
test_tool_option_parsing.py tools/record: add support for hidraw recording 2021-05-05 03:59:34 +00:00