From 1ab385bc83504272cf4507d72ac0d6ab448aac9c Mon Sep 17 00:00:00 2001 From: Velimir Lisec Date: Thu, 30 Apr 2015 00:13:51 +0200 Subject: [PATCH 1/2] touchpad: end tap-and-drag with an extra tap Currently for the tap-and-drag gesture to end user has to wait for a timeout to expire. Make it possible to end the drag gesture by just tapping. The allowed finger sequences to start and end a drag are thus: tap, down, .... move ...., up tap, down, .... move ...., up, tap https://bugs.freedesktop.org/show_bug.cgi?id=90255 Signed-off-by: Velimir Lisec Reviewed-by: Peter Hutterer State diagram changes and a doc change squashed in. Signed-off-by: Peter Hutterer --- doc/tapping.dox | 4 + doc/touchpad-tap-state-machine.svg | 479 ++++++++++++++++------------- src/evdev-mt-touchpad-tap.c | 36 ++- src/evdev-mt-touchpad.h | 1 + 4 files changed, 302 insertions(+), 218 deletions(-) diff --git a/doc/tapping.dox b/doc/tapping.dox index f603b7d5..7eb81e62 100644 --- a/doc/tapping.dox +++ b/doc/tapping.dox @@ -33,6 +33,10 @@ continue the dragging process, so that multiple touchpad-widths of distance can be covered easily. If two-fingers are supported by the hardware, a second finger can be used to drag while the first is held in-place. +An alternative method to end a drag process is to tap immediately after +lifting the finger. The full sequence is thus: tap, finger down, drag, +finger up, tap. + @section tap_constraints Constraints while tapping A couple of constraints apply to the contact to be converted into a press, the most common ones are: diff --git a/doc/touchpad-tap-state-machine.svg b/doc/touchpad-tap-state-machine.svg index b168b4f6..39b0b86b 100644 --- a/doc/touchpad-tap-state-machine.svg +++ b/doc/touchpad-tap-state-machine.svg @@ -14,93 +14,93 @@ - IDLE + IDLE - TOUCH + TOUCH - first + first - finger down + finger down - finger up + finger up - button 1 + button 1 - press + press - timeout + timeout - move > + move > - threshold + threshold - second + second - finger down + finger down - TOUCH_2 + TOUCH_2 - second + second - finger up + finger up - button 2 + button 2 - press + press - move > + move > - threshold + threshold - timeout + timeout @@ -109,16 +109,16 @@ - button 1 + button 1 - release + release - button 2 + button 2 - release + release @@ -127,42 +127,42 @@ - TAPPED + TAPPED - timeout + timeout - first + first - finger down + finger down - DRAGGING + DRAGGING - first + first - finger up + finger up - btn1 + btn1 - release + release @@ -173,81 +173,81 @@ - IDLE + IDLE - third + third - finger down + finger down - TOUCH_3 + TOUCH_3 - button 3 + button 3 - press + press - button 3 + button 3 - release + release - move > + move > - threshold + threshold - IDLE + IDLE - timeout + timeout - first + first - finger up + finger up - IDLE + IDLE - fourth + fourth - finger down + finger down @@ -256,64 +256,64 @@ - DRAGGING_OR_DOUBLETAP + DRAGGING_OR_DOUBLETAP - timeout + timeout - first + first - finger up + finger up - button 1 + button 1 - release + release - button 1 + button 1 - press + press - btn1 + btn1 - release + release - second + second - finger down + finger down - move > + move > - threshold + threshold @@ -322,14 +322,14 @@ - HOLD + HOLD - first + first - finger up + finger up @@ -338,9 +338,9 @@ - second + second - finger down + finger down @@ -351,23 +351,23 @@ - TOUCH_2_HOLD + TOUCH_2_HOLD - second + second - finger up + finger up - first + first - finger up + finger up @@ -378,9 +378,9 @@ - third + third - finger down + finger down @@ -391,21 +391,21 @@ - TOUCH_3_HOLD + TOUCH_3_HOLD - fourth + fourth - finger down + finger down - DEAD + DEAD @@ -416,19 +416,19 @@ - any finger up + any finger up - fourth + fourth - finger up + finger up - any finger up + any finger up @@ -437,12 +437,12 @@ - yes + yes - any finger up + any finger up @@ -455,14 +455,14 @@ - IDLE + IDLE - if finger + if finger - count == 0 + count == 0 @@ -473,14 +473,14 @@ - second + second - finger up + finger up - DRAGGING_2 + DRAGGING_2 @@ -489,9 +489,9 @@ - first + first - finger up + finger up @@ -502,9 +502,9 @@ - second + second - finger down + finger down @@ -515,29 +515,29 @@ - third + third - finger down + finger down - btn1 + btn1 - release + release - phys + phys - button + button - press + press @@ -554,23 +554,23 @@ - phys + phys - button + button - press + press - + - - button 1 - - release + + button 1 + + release - - + + @@ -582,12 +582,12 @@ - DRAGGING_WAIT + DRAGGING_WAIT - timeout + timeout @@ -598,21 +598,21 @@ - first + first - finger down + finger down - TOUCH_TOUCH + TOUCH_TOUCH - TOUCH_IDLE + TOUCH_IDLE @@ -625,7 +625,7 @@ - TOUCH_DEAD + TOUCH_DEAD @@ -640,12 +640,12 @@ - yes + yes - TOUCH_DEAD + TOUCH_DEAD @@ -656,14 +656,14 @@ - TOUCH_IDLE + TOUCH_IDLE - TOUCH_TOUCH + TOUCH_TOUCH @@ -672,44 +672,44 @@ - TOUCH_IDLE + TOUCH_IDLE - TOUCH_IDLE + TOUCH_IDLE - TOUCH_IDLE + TOUCH_IDLE - TOUCH_TOUCH + TOUCH_TOUCH - that finger + that finger - TOUCH_IDLE + TOUCH_IDLE - TOUCH_DEAD + TOUCH_DEAD @@ -720,9 +720,9 @@ - that finger + that finger - TOUCH_IDLE + TOUCH_IDLE @@ -731,31 +731,31 @@ - no + no - TOUCH_TOUCH + TOUCH_TOUCH - TOUCH_IDLE + TOUCH_IDLE - TOUCH_TOUCH + TOUCH_TOUCH - TOUCH_DEAD + TOUCH_DEAD @@ -764,175 +764,171 @@ - TOUCH_IDLE + TOUCH_IDLE - + - - TOUCH_TOUCH + + TOUCH_TOUCH - - - - - TOUCH_TOUCH + TOUCH_TOUCH - TOUCH_IDLE + TOUCH_IDLE - TOUCH_IDLE + TOUCH_IDLE - TOUCH_TOUCH + TOUCH_TOUCH - TOUCH_IDLE + TOUCH_IDLE - TOUCH_TOUCH + TOUCH_TOUCH - that finger + that finger - TOUCH_IDLE + TOUCH_IDLE - TOUCH_DEAD + TOUCH_DEAD - TOUCH_DEAD + TOUCH_DEAD - TOUCH_DEAD + TOUCH_DEAD - TOUCH_DEAD + TOUCH_DEAD - - + + - TOUCH_DEAD + TOUCH_DEAD - TOUCH_DEAD + TOUCH_DEAD - state == + state == - TOUCH_TOUCH + TOUCH_TOUCH - that finger state == + that finger state == - TOUCH_TOUCH + TOUCH_TOUCH - no + no - TOUCH_DEAD + TOUCH_DEAD - TOUCH_DEAD + TOUCH_DEAD - TOUCH_DEAD + TOUCH_DEAD - first + first - finger down + finger down - + - - MULTITAP + + MULTITAP - - - - + + + + - timeout + timeout - - + + - IDLE + IDLE @@ -943,14 +939,14 @@ - MULTITAP_DOWN + MULTITAP_DOWN - button 1 + button 1 - press + press @@ -959,39 +955,39 @@ - first + first - finger up + finger up - button 1 + button 1 - release + release - timeout + timeout - second + second - finger down + finger down - move > + move > - threshold + threshold @@ -1002,16 +998,16 @@ - button 1 + button 1 - release + release - button 1 + button 1 - press + press @@ -1022,16 +1018,16 @@ - button 1 + button 1 - release + release - button 1 + button 1 - press + press @@ -1042,16 +1038,16 @@ - button 1 + button 1 - release + release - button 1 + button 1 - press + press @@ -1059,36 +1055,87 @@ - - + + - TOUCH_TOUCH + TOUCH_TOUCH - TOUCH_IDLE + TOUCH_IDLE - phys + phys - button + button - press + press - - + + + + + + DRAGGING_OR_TAP + + + + + first + + finger up + + + + + + + timeout + + + + + + + + + move > + + threshold + + + + + + + + + + + + + + + TOUCH_IDLE + + + + + + + diff --git a/src/evdev-mt-touchpad-tap.c b/src/evdev-mt-touchpad-tap.c index 61f94e51..fb8c9e43 100644 --- a/src/evdev-mt-touchpad-tap.c +++ b/src/evdev-mt-touchpad-tap.c @@ -74,6 +74,7 @@ tap_state_to_str(enum tp_tap_state state) CASE_RETURN_STRING(TAP_STATE_DRAGGING); CASE_RETURN_STRING(TAP_STATE_DRAGGING_WAIT); CASE_RETURN_STRING(TAP_STATE_DRAGGING_OR_DOUBLETAP); + CASE_RETURN_STRING(TAP_STATE_DRAGGING_OR_TAP); CASE_RETURN_STRING(TAP_STATE_DRAGGING_2); CASE_RETURN_STRING(TAP_STATE_MULTITAP); CASE_RETURN_STRING(TAP_STATE_MULTITAP_DOWN); @@ -409,8 +410,8 @@ tp_tap_dragging_wait_handle_event(struct tp_dispatch *tp, switch (event) { case TAP_EVENT_TOUCH: - tp->tap.state = TAP_STATE_DRAGGING; - tp_tap_clear_timer(tp); + tp->tap.state = TAP_STATE_DRAGGING_OR_TAP; + tp_tap_set_timer(tp, time); break; case TAP_EVENT_RELEASE: case TAP_EVENT_MOTION: @@ -426,6 +427,32 @@ tp_tap_dragging_wait_handle_event(struct tp_dispatch *tp, } } +static void +tp_tap_dragging_tap_handle_event(struct tp_dispatch *tp, + struct tp_touch *t, + enum tap_event event, uint64_t time) +{ + + switch (event) { + case TAP_EVENT_TOUCH: + tp->tap.state = TAP_STATE_DRAGGING_2; + tp_tap_clear_timer(tp); + break; + case TAP_EVENT_RELEASE: + tp->tap.state = TAP_STATE_IDLE; + tp_tap_notify(tp, time, 1, LIBINPUT_BUTTON_STATE_RELEASED); + break; + case TAP_EVENT_MOTION: + case TAP_EVENT_TIMEOUT: + tp->tap.state = TAP_STATE_DRAGGING; + break; + case TAP_EVENT_BUTTON: + tp->tap.state = TAP_STATE_DEAD; + tp_tap_notify(tp, time, 1, LIBINPUT_BUTTON_STATE_RELEASED); + break; + } +} + static void tp_tap_dragging2_handle_event(struct tp_dispatch *tp, struct tp_touch *t, @@ -588,6 +615,9 @@ tp_tap_handle_event(struct tp_dispatch *tp, case TAP_STATE_DRAGGING_WAIT: tp_tap_dragging_wait_handle_event(tp, t, event, time); break; + case TAP_STATE_DRAGGING_OR_TAP: + tp_tap_dragging_tap_handle_event(tp, t, event, time); + break; case TAP_STATE_DRAGGING_2: tp_tap_dragging2_handle_event(tp, t, event, time); break; @@ -692,6 +722,7 @@ tp_tap_handle_state(struct tp_dispatch *tp, uint64_t time) case TAP_STATE_TOUCH: case TAP_STATE_TAPPED: case TAP_STATE_DRAGGING_OR_DOUBLETAP: + case TAP_STATE_DRAGGING_OR_TAP: case TAP_STATE_TOUCH_2: case TAP_STATE_TOUCH_3: case TAP_STATE_MULTITAP_DOWN: @@ -870,6 +901,7 @@ tp_tap_dragging(struct tp_dispatch *tp) case TAP_STATE_DRAGGING: case TAP_STATE_DRAGGING_2: case TAP_STATE_DRAGGING_WAIT: + case TAP_STATE_DRAGGING_OR_TAP: return true; default: return false; diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h index 37113752..f602359f 100644 --- a/src/evdev-mt-touchpad.h +++ b/src/evdev-mt-touchpad.h @@ -94,6 +94,7 @@ enum tp_tap_state { TAP_STATE_TOUCH_3, TAP_STATE_TOUCH_3_HOLD, TAP_STATE_DRAGGING_OR_DOUBLETAP, + TAP_STATE_DRAGGING_OR_TAP, TAP_STATE_DRAGGING, TAP_STATE_DRAGGING_WAIT, TAP_STATE_DRAGGING_2, From 2e0f45b5373ffbf80b5b8c417e6a2065da1020b0 Mon Sep 17 00:00:00 2001 From: Velimir Lisec Date: Wed, 6 May 2015 08:42:37 +0200 Subject: [PATCH 2/2] test: add test cases for ending drag with a tap Signed-off-by: Velimir Lisec Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer --- test/touchpad.c | 261 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 261 insertions(+) diff --git a/test/touchpad.c b/test/touchpad.c index ad9e130c..3d37f9e2 100644 --- a/test/touchpad.c +++ b/test/touchpad.c @@ -511,6 +511,168 @@ START_TEST(touchpad_1fg_multitap_n_drag_timeout) } END_TEST +START_TEST(touchpad_1fg_multitap_n_drag_tap) +{ + struct litest_device *dev = litest_current_device(); + struct libinput *li = dev->libinput; + struct libinput_event *event; + struct libinput_event_pointer *ptrev; + uint32_t oldtime = 0, + curtime; + int i, ntaps; + + libinput_device_config_tap_set_enabled(dev->libinput_device, + LIBINPUT_CONFIG_TAP_ENABLED); + + litest_drain_events(li); + + for (i = 3; i < 5; i++) { + + for (ntaps = 0; ntaps <= i; ntaps++) { + litest_touch_down(dev, 0, 50, 50); + litest_touch_up(dev, 0); + libinput_dispatch(li); + msleep(10); + } + + libinput_dispatch(li); + litest_touch_down(dev, 0, 50, 50); + libinput_dispatch(li); + + litest_timeout_tap(); + libinput_dispatch(li); + + for (ntaps = 0; ntaps <= i; ntaps++) { + event = libinput_get_event(li); + ptrev = litest_is_button_event(event, + BTN_LEFT, + LIBINPUT_BUTTON_STATE_PRESSED); + curtime = libinput_event_pointer_get_time(ptrev); + libinput_event_destroy(event); + ck_assert_int_gt(curtime, oldtime); + + event = libinput_get_event(li); + ptrev = litest_is_button_event(event, + BTN_LEFT, + LIBINPUT_BUTTON_STATE_RELEASED); + curtime = libinput_event_pointer_get_time(ptrev); + libinput_event_destroy(event); + ck_assert_int_ge(curtime, oldtime); + oldtime = curtime; + } + + event = libinput_get_event(li); + ptrev = litest_is_button_event(event, + BTN_LEFT, + LIBINPUT_BUTTON_STATE_PRESSED); + curtime = libinput_event_pointer_get_time(ptrev); + libinput_event_destroy(event); + ck_assert_int_gt(curtime, oldtime); + + litest_touch_move_to(dev, 0, 50, 50, 70, 50, 10, 4); + + litest_assert_only_typed_events(li, + LIBINPUT_EVENT_POINTER_MOTION); + + litest_touch_up(dev, 0); + litest_touch_down(dev, 0, 70, 50); + litest_touch_up(dev, 0); + litest_assert_button_event(li, + BTN_LEFT, + LIBINPUT_BUTTON_STATE_RELEASED); + + litest_assert_empty_queue(li); + } +} +END_TEST + +START_TEST(touchpad_1fg_multitap_n_drag_tap_click) +{ + struct litest_device *dev = litest_current_device(); + struct libinput *li = dev->libinput; + struct libinput_event *event; + struct libinput_event_pointer *ptrev; + uint32_t oldtime = 0, + curtime; + int i, ntaps; + + libinput_device_config_tap_set_enabled(dev->libinput_device, + LIBINPUT_CONFIG_TAP_ENABLED); + + litest_drain_events(li); + + for (i = 3; i < 5; i++) { + + for (ntaps = 0; ntaps <= i; ntaps++) { + litest_touch_down(dev, 0, 50, 50); + litest_touch_up(dev, 0); + libinput_dispatch(li); + msleep(10); + } + + libinput_dispatch(li); + litest_touch_down(dev, 0, 50, 50); + libinput_dispatch(li); + + litest_timeout_tap(); + libinput_dispatch(li); + + for (ntaps = 0; ntaps <= i; ntaps++) { + event = libinput_get_event(li); + ptrev = litest_is_button_event(event, + BTN_LEFT, + LIBINPUT_BUTTON_STATE_PRESSED); + curtime = libinput_event_pointer_get_time(ptrev); + libinput_event_destroy(event); + ck_assert_int_gt(curtime, oldtime); + + event = libinput_get_event(li); + ptrev = litest_is_button_event(event, + BTN_LEFT, + LIBINPUT_BUTTON_STATE_RELEASED); + curtime = libinput_event_pointer_get_time(ptrev); + libinput_event_destroy(event); + ck_assert_int_ge(curtime, oldtime); + oldtime = curtime; + } + + event = libinput_get_event(li); + ptrev = litest_is_button_event(event, + BTN_LEFT, + LIBINPUT_BUTTON_STATE_PRESSED); + curtime = libinput_event_pointer_get_time(ptrev); + libinput_event_destroy(event); + ck_assert_int_gt(curtime, oldtime); + + litest_touch_move_to(dev, 0, 50, 50, 70, 50, 10, 4); + + litest_assert_only_typed_events(li, + LIBINPUT_EVENT_POINTER_MOTION); + + litest_touch_up(dev, 0); + litest_touch_down(dev, 0, 70, 50); + litest_button_click(dev, BTN_LEFT, true); + litest_button_click(dev, BTN_LEFT, false); + libinput_dispatch(li); + + litest_assert_button_event(li, + BTN_LEFT, + LIBINPUT_BUTTON_STATE_RELEASED); + + /* the physical click */ + litest_assert_button_event(li, + BTN_LEFT, + LIBINPUT_BUTTON_STATE_PRESSED); + litest_assert_button_event(li, + BTN_LEFT, + LIBINPUT_BUTTON_STATE_RELEASED); + litest_touch_up(dev, 0); + + litest_assert_empty_queue(li); + } +} +END_TEST + START_TEST(touchpad_1fg_tap_n_drag) { struct litest_device *dev = litest_current_device(); @@ -552,6 +714,101 @@ START_TEST(touchpad_1fg_tap_n_drag) } END_TEST +START_TEST(touchpad_1fg_tap_n_drag_tap) +{ + struct litest_device *dev = litest_current_device(); + struct libinput *li = dev->libinput; + + libinput_device_config_tap_set_enabled(dev->libinput_device, + LIBINPUT_CONFIG_TAP_ENABLED); + + litest_drain_events(li); + + litest_touch_down(dev, 0, 50, 50); + litest_touch_up(dev, 0); + litest_touch_down(dev, 0, 50, 50); + litest_touch_move_to(dev, 0, 50, 50, 80, 80, 5, 40); + litest_touch_up(dev, 0); + + libinput_dispatch(li); + + litest_assert_button_event(li, BTN_LEFT, + LIBINPUT_BUTTON_STATE_PRESSED); + + libinput_dispatch(li); + + litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); + + /* lift finger, set down again, should continue dragging */ + litest_touch_down(dev, 0, 50, 50); + litest_touch_move_to(dev, 0, 50, 50, 80, 80, 5, 40); + + litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); + + litest_touch_up(dev, 0); + litest_touch_down(dev, 0, 50, 50); + litest_touch_up(dev, 0); + + litest_assert_button_event(li, BTN_LEFT, + LIBINPUT_BUTTON_STATE_RELEASED); + + litest_assert_empty_queue(li); +} +END_TEST + +START_TEST(touchpad_1fg_tap_n_drag_tap_click) +{ + struct litest_device *dev = litest_current_device(); + struct libinput *li = dev->libinput; + + libinput_device_config_tap_set_enabled(dev->libinput_device, + LIBINPUT_CONFIG_TAP_ENABLED); + + litest_drain_events(li); + + litest_touch_down(dev, 0, 50, 50); + litest_touch_up(dev, 0); + litest_touch_down(dev, 0, 50, 50); + litest_touch_move_to(dev, 0, 50, 50, 80, 80, 5, 40); + litest_touch_up(dev, 0); + + libinput_dispatch(li); + + litest_assert_button_event(li, BTN_LEFT, + LIBINPUT_BUTTON_STATE_PRESSED); + + libinput_dispatch(li); + + litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); + + /* lift finger, set down again, should continue dragging */ + litest_touch_down(dev, 0, 50, 50); + litest_touch_move_to(dev, 0, 50, 50, 80, 80, 5, 40); + + litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); + + litest_touch_up(dev, 0); + litest_touch_down(dev, 0, 50, 50); + litest_button_click(dev, BTN_LEFT, true); + litest_button_click(dev, BTN_LEFT, false); + libinput_dispatch(li); + + litest_assert_button_event(li, BTN_LEFT, + LIBINPUT_BUTTON_STATE_RELEASED); + + /* the physical click */ + litest_assert_button_event(li, + BTN_LEFT, + LIBINPUT_BUTTON_STATE_PRESSED); + litest_assert_button_event(li, + BTN_LEFT, + LIBINPUT_BUTTON_STATE_RELEASED); + litest_touch_up(dev, 0); + + litest_assert_empty_queue(li); +} +END_TEST + START_TEST(touchpad_1fg_tap_n_drag_timeout) { struct litest_device *dev = litest_current_device(); @@ -4291,10 +4548,12 @@ int main(int argc, char **argv) litest_add("touchpad:tap", touchpad_1fg_doubletap, LITEST_TOUCHPAD, LITEST_ANY); litest_add("touchpad:tap", touchpad_1fg_multitap, LITEST_TOUCHPAD, LITEST_ANY); litest_add("touchpad:tap", touchpad_1fg_multitap_n_drag_timeout, LITEST_TOUCHPAD, LITEST_ANY); + litest_add("touchpad:tap", touchpad_1fg_multitap_n_drag_tap, LITEST_TOUCHPAD, LITEST_ANY); litest_add("touchpad:tap", touchpad_1fg_multitap_n_drag_move, LITEST_TOUCHPAD, LITEST_ANY); litest_add("touchpad:tap", touchpad_1fg_multitap_n_drag_2fg, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH); litest_add("touchpad:tap", touchpad_1fg_multitap_n_drag_click, LITEST_CLICKPAD, LITEST_ANY); litest_add("touchpad:tap", touchpad_1fg_tap_n_drag, LITEST_TOUCHPAD, LITEST_ANY); + litest_add("touchpad:tap", touchpad_1fg_tap_n_drag_tap, LITEST_TOUCHPAD, LITEST_ANY); litest_add("touchpad:tap", touchpad_1fg_tap_n_drag_timeout, LITEST_TOUCHPAD, LITEST_ANY); litest_add("touchpad:tap", touchpad_2fg_tap_n_drag, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH); litest_add("touchpad:tap", touchpad_2fg_tap_n_drag_3fg_btntool, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH|LITEST_APPLE_CLICKPAD); @@ -4323,6 +4582,8 @@ int main(int argc, char **argv) pads with buttons */ litest_add("touchpad:tap", touchpad_1fg_double_tap_click, LITEST_CLICKPAD, LITEST_ANY); litest_add("touchpad:tap", touchpad_1fg_tap_n_drag_click, LITEST_CLICKPAD, LITEST_ANY); + litest_add("touchpad:tap", touchpad_1fg_multitap_n_drag_tap_click, LITEST_CLICKPAD, LITEST_ANY); + litest_add("touchpad:tap", touchpad_1fg_tap_n_drag_tap_click, LITEST_CLICKPAD, LITEST_ANY); litest_add("touchpad:tap", touchpad_tap_default_disabled, LITEST_TOUCHPAD|LITEST_BUTTON, LITEST_ANY); litest_add("touchpad:tap", touchpad_tap_default_enabled, LITEST_TOUCHPAD, LITEST_BUTTON);