Lines Matching +full:button +full:- +full:191

2 # SPDX-License-Identifier: GPL-2.0
3 # -*- coding: utf-8 -*-
18 # workaround https://gitlab.freedesktop.org/libevdev/python-libevdev/issues/6
48 :param buttons: a (l, r, m) tuple of bools for the button states,
94 :param buttons: a (l, r, m) tuple of bools for the button states,
114 0x05, 0x09, # ....Usage Page (Button) 14
128 0x15, 0x81, # ....Logical Minimum (-127) 42
157 x = max(-127, min(127, x))
158 y = max(-127, min(127, y))
170 0x05, 0x09, # .Usage Page (Button) 6
186 0x15, 0x81, # ..Logical Minimum (-127) 38
193 0x15, 0x81, # .Logical Minimum (-127) 51
215 0x05, 0x09, # ..Usage Page (Button) 10
224 0x16, 0x01, 0x80, # ..Logical Minimum (-32767) 28
231 0x15, 0x81, # ..Logical Minimum (-127) 44
262 0x05, 0x09, # ..Usage Page (Button)
275 0x15, 0x81, # ..Logical Minimum (-127)
291 0x16, 0x01, 0xf8, # ..Logical Minimum (-2047)
356 0x05, 0x09, # ...Usage Page (Button) 101
374 0x15, 0x81, # ...Logical Minimum (-127) 137
393 0x15, 0x81, # ....Logical Minimum (-127) 175
401 0x81, 0x06, # ...Input (Data,Var,Rel) 191
454 0x05, 0x09, # ...Usage Page (Button) 18
470 0x16, 0x01, 0x80, # ...Logical Minimum (-32767) 50
489 0x16, 0x01, 0x80, # ....Logical Minimum (-32767) 90
510 0x16, 0x01, 0x80, # ....Logical Minimum (-32767) 133
542 """check for button reliability."""
622 r = uhdev.event(0, -1)
623 expected_event = libevdev.InputEvent(libevdev.EV_REL.REL_Y, -1)
634 r = uhdev.event(-1, 2)
635 expected_event0 = libevdev.InputEvent(libevdev.EV_REL.REL_X, -1)
669 event = (-1, 0, (True, False, True))
672 event = (-5, 5, (True, False, True))
675 event = (-127, 127, (True, False, True))
678 event = (0, -128, (True, False, True))
700 # need to pre-multiply too.
712 r = uhdev.event(0, 0, wheels=-1 * mult)
714 expected.append(libevdev.InputEvent(libevdev.EV_REL.REL_WHEEL, -1))
716 expected.append(libevdev.InputEvent(libevdev.EV_REL.REL_WHEEL_HI_RES, -120))
721 r = uhdev.event(-1, 2, wheels=3 * mult)
723 expected.append(libevdev.InputEvent(libevdev.EV_REL.REL_X, -1))
752 # need to pre-multiply too.
765 r = uhdev.event(0, 0, wheels=(0, -1 * hmult))
767 expected.append(libevdev.InputEvent(libevdev.EV_REL.REL_HWHEEL, -1))
770 libevdev.InputEvent(libevdev.EV_REL.REL_HWHEEL_HI_RES, -120)
776 r = uhdev.event(-1, 2, wheels=(0, 3 * hmult))
778 expected.append(libevdev.InputEvent(libevdev.EV_REL.REL_X, -1))
787 r = uhdev.event(-1, 2, wheels=(-3 * vmult, 4 * hmult))
789 expected.append(libevdev.InputEvent(libevdev.EV_REL.REL_X, -1))
791 expected.append(libevdev.InputEvent(libevdev.EV_REL.REL_WHEEL, -3))
793 expected.append(libevdev.InputEvent(libevdev.EV_REL.REL_WHEEL_HI_RES, -360))
845 r = uhdev.event(0, 0, wheels=-1)
848 libevdev.InputEvent(libevdev.EV_REL.REL_WHEEL_HI_RES, -120 / mult)
856 expected.append(libevdev.InputEvent(libevdev.EV_REL.REL_Y, -2))
861 for _ in range(mult - 1):
862 r = uhdev.event(1, -2, wheels=1)
867 r = uhdev.event(1, -2, wheels=1)
934 r = uhdev.event(0, 0, wheels=(0, -1))
937 libevdev.InputEvent(libevdev.EV_REL.REL_HWHEEL_HI_RES, -120 / hmult)
945 expected.append(libevdev.InputEvent(libevdev.EV_REL.REL_Y, -2))
950 for _ in range(hmult - 1):
951 r = uhdev.event(1, -2, wheels=(0, 1))
956 r = uhdev.event(1, -2, wheels=(0, 1))