libinput/test
Joshua Goins beca998122 tablet: add API for relative dials
Some tablets such as those in the XP-PEN PRO series use "dials" which
are actually scrollwheels and emit EV_REL events. These should not be
emulated as rings (which are absolute) so we must expose them as a new
tablet event.

Adds LIBINPUT_EVENT_TABLET_PAD_DIAL that work largely identical as our
high-resolution wheel events (i.e. the values are in multiples or
fractions of of 120). Currently supports two dials.

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 mutually 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).
- With dials being REL_DIAL or REL_WHEEL there is no possibility of
  detecting a finger release (the kernel does not route EV_RELs with a
  value of zero). Unless this is implemented via a side-channel - and it
  doesn't look like any hardware that supports dials does that - we
  cannot forward any information here. So unlike absolute rings we
  cannot provide a source information here.

Closes #600

Co-authored-by: Peter Hutterer <peter.hutterer@who-t.net>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/967>
2024-02-20 02:49:05 +00:00
..
50-litest.conf test: rename the identifier in the 50-litest.conf 2020-07-15 09:36:48 +10:00
build-cxx.cc meson.build: drop the separate cpp flags 2020-09-09 13:57:39 +10:00
build-pedantic.c Fix a couple of coding style issues 2015-05-01 12:09:57 +10:00
check-double-macros.h Add the ck_double_eq_tol() macros to the backwards compat headers 2019-08-08 13:58:54 +10:00
check-leftover-udev-rules.sh test: add a script to check for leftover litest rules 2018-03-23 12:41:23 +10:00
generate-gcov-report.sh Hook up gcov for coverage reports 2017-01-20 10:35:37 +10:00
helper-copy-and-exec-from-tmp.sh tools: move the builddir lookup function out to a separate file 2019-03-14 11:28:05 +10:00
libinput-test-suite.man test: rename the identifier in the 50-litest.conf 2020-07-15 09:36:48 +10:00
litest-device-absinfo-override.c test: add a test case for checking EVDEV_ABS overrides 2020-02-12 21:22:01 +10:00
litest-device-acer-hawaii-keyboard.c test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-acer-hawaii-touchpad.c test: auto-generate the udev rules 2019-06-14 08:52:58 +10:00
litest-device-aiptek-tablet.c test: fix a wrong value for the auto-assigned BTN_TOOL 2024-01-22 01:21:29 +00:00
litest-device-alps-3fg.c touchpad: correct a wrong slot count by the kernel 2020-01-29 15:58:49 +10:00
litest-device-alps-dualpoint.c test: fix the input_id struct for the ALPS touchpad 2018-06-14 15:22:38 +10:00
litest-device-alps-semi-mt.c test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-anker-mouse-kbd.c test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-apple-appletouch.c test: fix a test device section name 2018-06-14 15:54:02 +10:00
litest-device-apple-internal-keyboard.c test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-apple-magicmouse.c test: auto-generate the udev rules 2019-06-14 08:52:58 +10:00
litest-device-asus-rog-gladius.c test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-atmel-hover.c test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-bcm5974.c test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-calibrated-touchscreen.c test: add a pre-calibrated flag and exclude the tests as necessary 2023-06-07 09:23:05 +10:00
litest-device-cyborg-rat-5.c test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-dell-canvas-totem-touch.c test: auto-generate the udev rules 2019-06-14 08:52:58 +10:00
litest-device-dell-canvas-totem.c test: auto-generate the udev rules 2019-06-14 08:52:58 +10:00
litest-device-elan-tablet.c test: change tablet coords to doubles and pass the pointer through 2023-06-07 09:23:05 +10:00
litest-device-elantech-touchpad.c test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-format-string.c evdev: strip the device name of format directives 2022-04-20 13:32:31 +10:00
litest-device-generic-pressurepad.c touchpad: disable the pressure axes wherever the resolution is nonzero 2021-02-08 03:38:26 +00:00
litest-device-generic-singletouch.c test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-gpio-keys.c test: auto-generate the udev rules 2019-06-14 08:52:58 +10:00
litest-device-hp-wmi-hotkeys.c test: auto-generate the udev rules 2019-06-14 08:52:58 +10:00
litest-device-huion-pentablet.c test: set pressure to zero on proxout for the tablets with forced prox out 2024-01-22 01:21:29 +00:00
litest-device-huion-q620m-dial.c tablet: add API for relative dials 2024-02-20 02:49:05 +00:00
litest-device-ignored-mouse.c test: auto-generate the udev rules 2019-06-14 08:52:58 +10:00
litest-device-keyboard-all-codes.c test: let the device custom create method return a bool 2019-03-22 16:23:17 +10:00
litest-device-keyboard-quirked.c quirks: allow overriding of AttrEventCode and AttrInputProp 2022-11-28 08:25:41 +10:00
litest-device-keyboard-razer-blackwidow.c test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-keyboard-razer-blade-stealth-videoswitch.c Merge branch 'wip/litest-use-sections-for-tests-v2' 2017-09-25 14:35:46 +10:00
litest-device-keyboard-razer-blade-stealth.c Merge branch 'wip/litest-use-sections-for-tests-v2' 2017-09-25 14:35:46 +10:00
litest-device-keyboard.c test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-lenovo-scrollpoint.c wheel: fix Lenovo Scrollpoint quirk 2022-06-07 19:55:42 +02:00
litest-device-lid-switch-surface3.c test: auto-generate the udev rules 2019-06-14 08:52:58 +10:00
litest-device-lid-switch.c test: auto-generate the udev rules 2019-06-14 08:52:58 +10:00
litest-device-logitech-media-keyboard-elite.c test: add two test devices for the false joystick labelling 2020-08-13 11:02:33 +10:00
litest-device-logitech-trackball.c test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-magic-trackpad.c test: auto-generate the udev rules 2019-06-14 08:52:58 +10:00
litest-device-mouse-low-dpi.c High-resolution scroll wheel support 2021-08-31 08:45:01 +02:00
litest-device-mouse-roccat.c test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-mouse-wheel-click-angle.c test: auto-generate the udev rules 2019-06-14 08:52:58 +10:00
litest-device-mouse-wheel-click-count.c test: auto-generate the udev rules 2019-06-14 08:52:58 +10:00
litest-device-mouse-wheel-tilt.c test: auto-generate the udev rules 2019-06-14 08:52:58 +10:00
litest-device-mouse.c High-resolution scroll wheel support 2021-08-31 08:45:01 +02:00
litest-device-ms-nano-transceiver-mouse.c Remove some duplicate empty lines 2018-04-16 15:14:23 +10:00
litest-device-ms-surface-cover.c test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-nexus4-touch-screen.c test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-protocol-a-touch-screen.c test: fix the ABS_Y handling for the Protocol A test device 2020-07-09 09:50:49 +10:00
litest-device-qemu-usb-tablet.c test: make the custom touch override methods filter-able 2020-01-29 15:58:49 +10:00
litest-device-sony-vaio-keys.c test: add two test devices for the false joystick labelling 2020-08-13 11:02:33 +10:00
litest-device-synaptics-hover.c udev: drop the JUMPING_SEMI_MT quirk, no-one uses it 2018-05-31 13:09:37 +10:00
litest-device-synaptics-i2c.c Switch from udev property parsing to the quirks system 2018-06-08 14:37:22 +10:00
litest-device-synaptics-phantomclicks.c Disregard touchless clicks on flaky devices 2023-04-11 02:00:52 +00:00
litest-device-synaptics-pressurepad.c touchpad: disable the pressure axes wherever the resolution is nonzero 2021-02-08 03:38:26 +00:00
litest-device-synaptics-rmi4.c test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-synaptics-st.c test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-synaptics-t440.c test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-synaptics-x1-carbon-3rd.c Switch from udev property parsing to the quirks system 2018-06-08 14:37:22 +10:00
litest-device-synaptics-x220.c test: rename the x220 clickpad to something more telling 2018-08-07 10:00:40 +10:00
litest-device-tablet-doubledial.c tablet: add API for relative dials 2024-02-20 02:49:05 +00:00
litest-device-tablet-mode-switch.c evdev: filter unreliable tablet mode switch events 2020-06-03 22:32:56 +00:00
litest-device-tablet-rel-dial.c tablet: add API for relative dials 2024-02-20 02:49:05 +00:00
litest-device-thinkpad-extrabuttons.c test: auto-generate the udev rules 2019-06-14 08:52:58 +10:00
litest-device-touch-screen.c test: give the generic MT touchscreen realistic ranges 2023-03-17 14:04:58 +10:00
litest-device-touchpad-palm-threshold-zero.c touchpad: allow a palm pressure threshold of 0 to disable 2023-10-09 07:03:47 +00:00
litest-device-touchscreen-fuzz.c udev: re-instate the model-quirks callout 2018-09-10 15:57:27 +10:00
litest-device-touchscreen-invalid-range.c test: remove unsupported events from the invalid-range touchscreen test device 2018-07-16 10:37:42 +10:00
litest-device-touchscreen-mt-tool.c fallback: add support for ABS_MT_TOOL_TYPE for touch screens 2018-08-03 14:21:18 +10:00
litest-device-trackpoint.c test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-uclogic-tablet.c test: set pressure to zero on proxout for the tablets with forced prox out 2024-01-22 01:21:29 +00:00
litest-device-vmware-virtual-usb-mouse.c test: make the custom touch override methods filter-able 2020-01-29 15:58:49 +10:00
litest-device-wacom-bamboo-2fg-finger.c test: auto-generate the udev rules 2019-06-14 08:52:58 +10:00
litest-device-wacom-bamboo-2fg-pad.c test: auto-generate the udev rules 2019-06-14 08:52:58 +10:00
litest-device-wacom-bamboo-2fg-pen.c test: auto-assign the tool type for tablet tests 2020-09-22 17:35:41 +10:00
litest-device-wacom-bamboo-16fg-pen.c test: auto-assign the tool type for tablet tests 2020-09-22 17:35:41 +10:00
litest-device-wacom-calibrated-tablet.c test: add a calibrated (swapped) tablet device 2023-06-07 09:23:05 +10:00
litest-device-wacom-cintiq-12wx-pen.c test: auto-assign the tool type for tablet tests 2020-09-22 17:35:41 +10:00
litest-device-wacom-cintiq-13hdt-finger.c test: auto-generate the udev rules 2019-06-14 08:52:58 +10:00
litest-device-wacom-cintiq-13hdt-pad.c test: auto-generate the udev rules 2019-06-14 08:52:58 +10:00
litest-device-wacom-cintiq-13hdt-pen.c test: auto-assign the tool type for tablet tests 2020-09-22 17:35:41 +10:00
litest-device-wacom-cintiq-24hd-pen.c test: auto-assign the tool type for tablet tests 2020-09-22 17:35:41 +10:00
litest-device-wacom-cintiq-24hdt-pad.c test: auto-generate the udev rules 2019-06-14 08:52:58 +10:00
litest-device-wacom-cintiq-pro-16-finger.c test: auto-generate the udev rules 2019-06-14 08:52:58 +10:00
litest-device-wacom-cintiq-pro-16-pad.c test: auto-generate the udev rules 2019-06-14 08:52:58 +10:00
litest-device-wacom-cintiq-pro-16-pen.c test: auto-assign the tool type for tablet tests 2020-09-22 17:35:41 +10:00
litest-device-wacom-ekr.c test: auto-generate the udev rules 2019-06-14 08:52:58 +10:00
litest-device-wacom-hid4800-pen.c test: auto-assign the tool type for tablet tests 2020-09-22 17:35:41 +10:00
litest-device-wacom-intuos3-pad.c test: auto-generate the udev rules 2019-06-14 08:52:58 +10:00
litest-device-wacom-intuos5-finger.c test: auto-generate the udev rules 2019-06-14 08:52:58 +10:00
litest-device-wacom-intuos5-pad.c test: auto-generate the udev rules 2019-06-14 08:52:58 +10:00
litest-device-wacom-intuos5-pen.c test: auto-assign the tool type for tablet tests 2020-09-22 17:35:41 +10:00
litest-device-wacom-isdv4-524c-pen.c test: change tablet coords to doubles and pass the pointer through 2023-06-07 09:23:05 +10:00
litest-device-wacom-isdv4-4200-pen.c test: auto-assign the tool type for tablet tests 2020-09-22 17:35:41 +10:00
litest-device-wacom-isdv4-e6-finger.c test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-wacom-isdv4-e6-pen.c test: auto-assign the tool type for tablet tests 2020-09-22 17:35:41 +10:00
litest-device-wacom-mobilestudio-pro-pad.c test: auto-generate the udev rules 2019-06-14 08:52:58 +10:00
litest-device-waltop-tablet.c test: auto-assign the tool type for tablet tests 2020-09-22 17:35:41 +10:00
litest-device-wheel-only.c test: auto-generate the udev rules 2019-06-14 08:52:58 +10:00
litest-device-xen-virtual-pointer.c test: make the custom touch override methods filter-able 2020-01-29 15:58:49 +10:00
litest-device-yubikey.c test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-int.h tablet: add API for relative dials 2024-02-20 02:49:05 +00:00
litest-selftest.c Fix a few coverity complaints 2020-11-10 14:27:22 +10:00
litest.c tablet: add API for relative dials 2024-02-20 02:49:05 +00:00
litest.h tablet: add API for relative dials 2024-02-20 02:49:05 +00:00
symbols-leak-test test: print the usage from the symbols-leak-test 2022-11-22 19:02:03 +00:00
test-builddir-lookup.c tools: move the builddir lookup function out to a separate file 2019-03-14 11:28:05 +10:00
test-device.c Disregard touchless clicks on flaky devices 2023-04-11 02:00:52 +00:00
test-gestures.c High-resolution scroll wheel support 2021-08-31 08:45:01 +02:00
test-keyboard.c util: auto-declare the element variable in ARRAY_FOR_EACH 2022-03-09 10:16:07 +10:00
test-library-version.c test: split the library version test out 2019-03-14 11:28:05 +10:00
test-log.c test: use a plain libinput context for the log priority check 2021-10-19 13:05:00 +10:00
test-misc.c timer: only warn about timer expiry issues when we're more than 20ms behind 2021-12-07 11:54:08 +10:00
test-pad.c tablet: add API for relative dials 2024-02-20 02:49:05 +00:00
test-path.c evdev: remove device when it is gone 2021-06-21 10:41:19 +00:00
test-pointer.c evdev: if a device's rotation is around 180 degrees, flip the wheel 2023-04-27 13:15:14 +10:00
test-quirks.c util: auto-declare the element variable in ARRAY_FOR_EACH 2022-03-09 10:16:07 +10:00
test-switch.c test: expand the tablet mode switch test to check for fake key releases 2023-07-17 09:32:24 +10:00
test-tablet.c tablet: add tablet tool pressure range configuration 2024-01-30 14:29:25 +10:00
test-totem.c evdev: add a helper macro for the absinfo range 2023-08-29 17:07:38 +00:00
test-touch.c test: drop the custom group names 2021-02-12 15:24:15 +10:00
test-touchpad-buttons.c Disregard touchless clicks on flaky devices 2023-04-11 02:00:52 +00:00
test-touchpad-tap.c High-resolution scroll wheel support 2021-08-31 08:45:01 +02:00
test-touchpad.c touchpad: allow a palm pressure threshold of 0 to disable 2023-10-09 07:03:47 +00:00
test-trackball.c Allow rotation on all mice and for any angle 2022-12-05 22:57:51 +00:00
test-trackpoint.c touchpad: new option dwtp (disable-while-trackpointing) 2022-03-08 01:33:40 +00:00
test-udev.c test: create devices for our udev seat checks 2021-08-09 10:50:25 +10:00
test-util-includes.c Split utility functions into separate source files 2019-09-11 12:23:04 +10:00
test-utils.c util: add a helper to normalize an axis to [0.0, 1.0] 2024-01-30 14:29:25 +10:00
test_quirks_files.py test: add a test to make sure we don't accidentally add Logitech receivers 2023-03-23 12:13:23 +10:00
valgrind.suppressions test: grab the device before any lid or tablet mode switches 2020-07-07 18:51:33 +10:00