Lines Matching defs:button

367 test_button_event(struct litest_device *dev, unsigned int button, int state)
371 litest_button_click_debounced(dev, li, button, state);
374 litest_assert_button_event(li, button,
400 /* Skip middle button test on trackpoints (used for scrolling) */
430 int button;
435 button = buttons[i / 2].code;
437 events[i++] = button;
475 button = libinput_event_pointer_get_button(pevent);
479 if (buttons[i].code == button) {
1292 /* Change while button is down, expect correct release event */
1383 /* Make left button switch to scrolling mode */
1437 uint32_t methods, button;
1442 button = libinput_device_config_scroll_get_button(device);
1443 ck_assert_int_eq(button, 0);
1444 button = libinput_device_config_scroll_get_default_button(device);
1445 ck_assert_int_eq(button, 0);
1579 unsigned int button)
1588 status = libinput_device_config_scroll_set_button(device, button);
1695 /* Enable lock while button is down */
1714 /* but on the next button press we scroll lock */
1756 * button down */
1780 /* but on the next button press we scroll lock */
1829 /* other button passes on normally */
1844 /* other button passes on normally */
1856 /* other button passes on normally */
1878 /* Enable lock while button is down */
1882 * as normal button event */
1956 * held down simultaneously. Everywhere else we expect middle button
2077 /* But a non-scroll button it should work normally */
2096 uint32_t button;
2098 /* button scrolling is only enabled if there is a
2099 middle button present */
2113 button = libinput_device_config_scroll_get_button(device);
2114 ck_assert_int_eq(button, BTN_MIDDLE);
2115 button = libinput_device_config_scroll_get_default_button(device);
2116 ck_assert_int_eq(button, BTN_MIDDLE);
2126 uint32_t button;
2133 button = libinput_device_config_scroll_get_button(device);
2134 ck_assert_int_eq(button, BTN_SIDE);
2592 unsigned int button;
2602 for (button = BTN_LEFT; button <= BTN_RIGHT; button++) {
2604 litest_button_click_debounced(device, li, button, true);
2609 button,
2612 litest_button_click_debounced(device, li, button, false);
2614 button,
2675 unsigned int button;
2689 /* one button down, then middle -> release buttons */
2690 for (button = BTN_LEFT; button <= BTN_RIGHT; button++) {
2691 /* release button before middle */
2693 litest_button_click_debounced(device, li, button, true);
2696 button,
2702 litest_button_click_debounced(device, li, button, false);
2704 button,
2712 /* release middle before button */
2713 litest_button_click_debounced(device, li, button, true);
2716 button,
2726 litest_button_click_debounced(device, li, button, false);
2728 button,
2740 unsigned int button;
2757 for (button = BTN_LEFT; button <= BTN_RIGHT; button++) {
2776 litest_button_click_debounced(device, li, button, false);
2778 litest_button_click_debounced(device, li, button, true);
2780 button,
2788 button,
3006 /* no button release */
3035 /* button scrolling should not stop middle emulation */
3149 unsigned int button = _i; /* ranged test */
3152 button))
3159 litest_event(dev, EV_KEY, button, 1);
3161 litest_event(dev, EV_KEY, button, 0);
3163 litest_event(dev, EV_KEY, button, 1);
3170 button,
3174 litest_event(dev, EV_KEY, button, 0);
3176 litest_event(dev, EV_KEY, button, 1);
3178 litest_event(dev, EV_KEY, button, 0);
3185 button,
3196 unsigned int button = _i; /* ranged test */
3199 button))
3206 /* Debouncing timeout is 25ms after a button down or up. Make sure we go
3209 litest_event(dev, EV_KEY, button, 1);
3213 litest_event(dev, EV_KEY, button, 0);
3217 litest_event(dev, EV_KEY, button, 1);
3224 button,
3228 litest_event(dev, EV_KEY, button, 0);
3232 litest_event(dev, EV_KEY, button, 1);
3236 litest_event(dev, EV_KEY, button, 0);
3243 button,
3329 unsigned int button = _i; /* ranged test */
3332 button))
3342 litest_event(dev, EV_KEY, button, 1);
3348 /* Not all devices can disable middle button emulation, time out on
3349 * middle button here to make sure the initial button press event
3356 button,
3360 litest_event(dev, EV_KEY, button, 0);
3362 litest_event(dev, EV_KEY, button, 1);
3366 litest_event(dev, EV_KEY, button, 0);
3372 button,
3391 /* Let's assume our button has ventricular fibrilation and sends a
3393 * fibrillation should cause one button down for the first press and
3402 /* Not all devices can disable middle button emulation, time out on
3403 * middle button here to make sure the initial button press event
3457 /* Spurious timeout is 12ms after a button down or up. Make sure we go
3604 * the other button */
3663 * other button should flush the release */
3669 /* bouncing right button triggers debounce */