libinput/test
Peter Hutterer c77b6b4c96 evdev: add new debouncing code
The current debouncing code monitors events and switches on when events are
too close together. From then on, any event can be delayed.

Vicente Bergas provided an algorithm that avoids most of these delays:
on a button state change we now forward the change without delay but start a
timer. If the button changes state during that timer, the changes are
ignored. On timer expiry, events are sent to match the hardware state
with the client's view of the device. This is only done if needed.

Thus, a press-release sequence of: PRP sends a single press event, a sequence of
PRPR sends press and then the release at the end of the timeout. The timeout
is short enough that the delay should not be noticeable.

This new mode is called the 'bounce' mode. The old mode is now referred to as
'spurious' mode and only covers the case of a button held down that loses
contact. It works as before, monitoring a button for these spurious contact
losses and switching on. When on, button release events are delayed as before.

The whole button debouncing moves to a state machine which makes debugging a
lot easier. See the accompanying SVG for the diagram.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit de994d135e)
2017-11-28 12:44:41 +10:00
..
50-litest.conf test: Prefix litest created device names with litest 2014-06-25 11:11:45 +10:00
build-cxx.cc test: Add include from C++ build test 2014-03-29 00:51:44 +01:00
build-pedantic.c Fix a couple of coding style issues 2015-05-01 12:09:57 +10:00
generate-gcov-report.sh Hook up gcov for coverage reports 2017-01-20 10:35:37 +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: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-alps-dualpoint.c test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +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: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +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: fix the device name for the magic mouse test device 2017-11-14 14:29:01 +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: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +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-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-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: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-huion-pentablet.c test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-ignored-mouse.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-all-codes.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-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-lid-switch-surface3.c test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-lid-switch.c test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +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: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-mouse-low-dpi.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-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: 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-count.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-tilt.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.c test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +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: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-qemu-usb-tablet.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-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-synaptics-i2c.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-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 test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-synaptics.c test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-thinkpad-extrabuttons.c test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-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-touchscreen-fuzz.c test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +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: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-vmware-virtual-usb-mouse.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-bamboo-2fg-finger.c test: add a wacom bamboo test device 2017-10-20 15:44:32 +10:00
litest-device-wacom-bamboo-2fg-pad.c test: add a wacom bamboo test device 2017-10-20 15:44:32 +10:00
litest-device-wacom-bamboo-2fg-pen.c test: add a wacom bamboo test device 2017-10-20 15:44:32 +10:00
litest-device-wacom-bamboo-16fg-pen.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-cintiq-12wx-pen.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-cintiq-13hdt-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-cintiq-13hdt-pad.c test: fix pid for the 13HDT pad 2017-10-20 15:44:32 +10:00
litest-device-wacom-cintiq-13hdt-pen.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-cintiq-24hd-pen.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-cintiq-24hdt-pad.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-ekr.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-hid4800-pen.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-intuos3-pad.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-intuos5-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-intuos5-pad.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-intuos5-pen.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-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: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-wacom-mobilestudio-pro-pad.c test: fix missing BTN_9 for the MobileStudio device 2017-10-20 15:44:32 +10:00
litest-device-waltop-tablet.c test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-wheel-only.c test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +10:00
litest-device-xen-virtual-pointer.c test: switch to a TEST_DEVICE macro for all the litest test devices 2017-09-21 15:06:17 +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 Drop HAVE_CONFIG_H ifdef 2016-12-01 11:06:54 +10:00
litest-selftest.c test: fix compiler warning 2016-01-20 12:56:35 +10:00
litest.c evdev: add new debouncing code 2017-11-28 12:44:41 +10:00
litest.h test: replace litest_button_click with a debounced version 2017-11-28 12:44:41 +10:00
symbols-leak-test.in test: allow running the symbols-leak-test.in script directly 2017-05-04 13:49:37 +10:00
test-device.c test: replace litest_button_click with a debounced version 2017-11-28 12:44:41 +10:00
test-gestures.c test: fix typo in test case name 2017-08-17 02:03:15 +02:00
test-keyboard.c Fix a few things scan-build complains about 2017-07-10 10:37:58 +10:00
test-log.c test: fix a comment in the log_priority test 2017-10-10 19:09:29 +10:00
test-misc.c test: replace litest_button_click with a debounced version 2017-11-28 12:44:41 +10:00
test-pad.c test: replace litest_button_click with a debounced version 2017-11-28 12:44:41 +10:00
test-path.c Add support for LIBINPUT_IGNORE_DEVICE 2017-08-23 14:56:51 +10:00
test-pointer.c evdev: add new debouncing code 2017-11-28 12:44:41 +10:00
test-switch.c fallback: fix lid switch event listener being initialized twice 2017-10-27 15:20:35 +10:00
test-tablet.c tablet: always enable the no-proximity-out quirk on HUION tablets 2017-09-21 12:27:46 +10:00
test-touch.c test: add a test for removing a touch device with a finger still down 2017-08-28 14:25:17 +10:00
test-touchpad-buttons.c test: replace litest_button_click with a debounced version 2017-11-28 12:44:41 +10:00
test-touchpad-tap.c test: replace litest_button_click with a debounced version 2017-11-28 12:44:41 +10:00
test-touchpad.c test: replace litest_button_click with a debounced version 2017-11-28 12:44:41 +10:00
test-trackball.c test: prefix all test source files with "test-" 2017-01-16 08:59:00 +10:00
test-trackpoint.c test: replace litest_button_click with a debounced version 2017-11-28 12:44:41 +10:00
test-udev.c Add support for LIBINPUT_IGNORE_DEVICE 2017-08-23 14:56:51 +10:00
valgrind.suppressions evdev: recover from a lost button count 2017-07-25 09:30:24 +10:00