Lines Matching +full:a +full:- +full:f

2 # SPDX-License-Identifier: GPL-2.0
3 # -*- coding: utf-8 -*-
35 """Represents whether a button is pressed on the stylus"""
44 https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/windows-pen-states
67 def from_evdev(cls, evdev, test_button) -> "PenState":
100 ) -> "PenState":
113 raise ValueError(f"duplicated BTN_TOUCH in {events}")
121 raise ValueError(f"duplicated BTN_TOOL_* in {events}")
126 raise ValueError(f"duplicated BTN_STYLUS* in {events}")
139 ), f"moving from {self} to {new_state} is forbidden"
143 ), f"moving from {self} to {new_state} is forbidden"
147 def valid_transitions(self) -> Tuple["PenState", ...]:
207 def historically_tolerated_transitions(self) -> Tuple["PenState", ...]:
208 """Following the state machine in the URL above, with a couple of addition
209 for skipping the in-range state, due to historical reasons.
272 def legal_transitions() -> Dict[str, Tuple["PenState", ...]]:
274 we don't have Invert nor Erase bits, so just move in/out-of-range or proximity.
275 … https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/windows-pen-states
278 "in-range": (PenState.PEN_IS_IN_RANGE,),
279 "in-range -> out-of-range": (
283 "in-range -> touch": (PenState.PEN_IS_IN_RANGE, PenState.PEN_IS_IN_CONTACT),
284 "in-range -> touch -> release": (
289 "in-range -> touch -> release -> out-of-range": (
298 def legal_transitions_with_invert() -> Dict[str, Tuple["PenState", ...]]:
302 … https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/windows-pen-states
305 "hover-erasing": (PenState.PEN_IS_IN_RANGE_WITH_ERASING_INTENT,),
306 "hover-erasing -> out-of-range": (
310 "hover-erasing -> erase": (
314 "hover-erasing -> erase -> release": (
319 "hover-erasing -> erase -> release -> out-of-range": (
325 "hover-erasing -> in-range": (
329 "in-range -> hover-erasing": (
336 def legal_transitions_with_button() -> Dict[str, Tuple["PenState", ...]]:
338 we now have a button.
341 "hover-button": (PenState.PEN_IS_IN_RANGE_WITH_BUTTON,),
342 "hover-button -> out-of-range": (
346 "in-range -> button-press": (
350 "in-range -> button-press -> button-release": (
355 "in-range -> touch -> button-press -> button-release": (
361 "in-range -> touch -> button-press -> release -> button-release": (
368 "in-range -> button-press -> touch -> release -> button-release": (
375 "in-range -> button-press -> touch -> button-release -> release": (
385 def tolerated_transitions() -> Dict[str, Tuple["PenState", ...]]:
390 "direct-in-contact": (PenState.PEN_IS_IN_CONTACT,),
391 "direct-in-contact -> out-of-range": (
398 def tolerated_transitions_with_invert() -> Dict[str, Tuple["PenState", ...]]:
402 … https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/windows-pen-states
405 "direct-erase": (PenState.PEN_IS_ERASING,),
406 "direct-erase -> out-of-range": (
413 def broken_transitions() -> Dict[str, Tuple["PenState", ...]]:
415 However, a half broken device might export those transitions.
416 For example, a pen that has the eraser button might wobble between
420 "in-range -> touch -> erase -> hover-erase": (
426 "in-range -> erase -> hover-erase": (
431 "hover-erase -> erase -> touch -> in-range": (
437 "hover-erase -> touch -> in-range": (
442 "touch -> erase -> touch -> erase": (
498 ), f"assert evdev.value[{axis}] ({evdev.value[axis]}) != {value}"
538 physicals = [f.physical_name for f in r]
541 self.fields = [f.usage_name for f in r]
548 print(f"\n *** pen is moving to {state} ***")
677 # now check for a valid transition
686 """Internal method to test against a list of
688 state_list is a list of PenState objects
689 scribble is a boolean which tells if we need
690 to wobble a little the X,Y coordinates of the pen
709 p.y -= 1
718 p.y -= 1
732 we don't have Invert nor Erase bits, so just move in/out-of-range or proximity.
733 … https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/windows-pen-states
830 … https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/windows-pen-states
850 … https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/windows-pen-states
865 However, a half broken device might export those transitions.
866 For example, a pen that has the eraser button might wobble between
880 # surface, in-range stays to 1, but when
881 # the pen moves in-range gets reverted to 0
903 Pen with two buttons and a rubber end, but which reports
927 print(f"\n *** pen is moving to {state} ***")
1030 print(f"\n *** pen is moving to {state} ***")
1083 # the pen reliably sends in-range events in a normal case (non emulation of eraser mode)
1167 print(f"\n *** pen is moving to {state} ***")
1251 # going out-of-prox: the eraser mode is activated by presenting
1302 # return PenDigitizer('uhid test egalax-capacitive_0eef_7224',
1303f 81 02 09 31 75 10 95 01 55 0d 65 33 35 00 46 37 29 26 ff 7f 81 02 05 0d 09 55 25 08 75 08 95 01 …
1310 # return PenDigitizer('uhid test egalax-capacitive_0eef_72fa',
1311f 81 02 09 31 75 10 95 01 55 0d 65 33 35 00 46 87 13 26 ff 7f 81 02 05 0d 09 55 25 08 75 08 95 01 …
1318 # return PenDigitizer('uhid test egalax-capacitive_0eef_7336',
1319f 81 02 09 31 75 10 95 01 55 0d 65 33 35 00 46 c2 18 26 ff 7f 81 02 05 0d 09 55 25 08 75 08 95 01 …
1326 # return PenDigitizer('uhid test egalax-capacitive_0eef_7337',
1327f 81 02 09 31 75 10 95 01 55 0d 65 33 35 00 46 c3 0e 26 ff 7f 81 02 05 0d 09 55 25 08 75 08 95 01 …
1334 # return PenDigitizer('uhid test egalax-capacitive_0eef_7349',
1335f 81 02 09 31 75 10 95 01 55 0d 65 33 35 00 46 37 29 26 ff 7f 81 02 05 0d 09 55 25 08 75 08 95 01 …
1342 # return PenDigitizer('uhid test egalax-capacitive_0eef_73f4',
1343f 81 02 09 31 75 10 95 01 55 0d 65 33 35 00 46 23 2c 26 ff 7f 81 02 05 0d 09 55 25 08 75 08 95 01 …
1351f 75 10 95 02 81 02 c0 c0 05 0d 09 04 a1 01 85 30 09 22 a1 02 09 42 15 00 25 01 75 01 95 01 81 02 …
1359f 75 10 55 0e 65 11 09 30 35 00 46 1e 19 81 02 26 ff 3f 09 31 35 00 46 be 0f 81 02 26 ff 3f c0 a1 …
1368f 75 10 55 0d 65 00 09 30 35 00 46 00 00 81 02 26 ff 3f 09 31 35 00 46 00 00 81 02 26 ff 3f 05 0d …
1377f 75 10 55 0d 65 00 09 30 35 00 46 00 00 81 02 26 ff 3f 09 31 35 00 46 00 00 81 02 26 ff 3f 05 0d …
1391f 75 05 09 51 81 02 05 01 55 0e 65 11 35 00 75 10 95 02 46 c8 0a 26 6f 08 09 30 81 02 35 00 35 00 …
1398f 75 05 09 51 81 02 05 01 55 0e 65 11 35 00 75 10 95 01 46 00 0a 26 ff 0f 09 30 81 02 09 00 81 03 …
1406f 09 29 85 29 b1 02 95 1f 09 2a 85 2a b1 02 95 3e 09 2b 85 2b b1 02 95 fe 09 2c 85 2c b1 02 96 fe …
1414f 09 29 85 29 b1 02 95 1f 09 2a 85 2a b1 02 95 3e 09 2b 85 2b b1 02 95 fe 09 2c 85 2c b1 02 96 fe …
1422f 09 29 85 29 b1 02 95 1f 09 2a 85 2a b1 02 95 3e 09 2b 85 2b b1 02 95 fe 09 2c 85 2c b1 02 96 fe …
1430f 09 29 85 29 b1 02 95 1f 09 2a 85 2a b1 02 95 3e 09 2b 85 2b b1 02 95 fe 09 2c 85 2c b1 02 96 fe …
1438f 09 29 85 29 b1 02 95 1f 09 2a 85 2a b1 02 95 3e 09 2b 85 2b b1 02 95 fe 09 2c 85 2c b1 02 96 fe …
1446f 07 09 30 81 02 26 80 0c 46 77 04 09 31 81 02 05 0d c0 09 22 a1 02 09 42 25 01 75 01 95 01 81 02 …
1461f 81 02 26 ff 00 75 08 55 0f 65 11 35 00 45 ff 09 48 81 02 09 49 81 02 09 30 81 02 95 01 05 01 a4 …
1470f 09 30 75 07 81 42 95 01 75 08 09 51 81 02 75 10 05 01 26 04 20 46 e6 09 09 30 81 02 26 60 15 46 …
1481 …46 ff 34 26 ff 7f 81 02 09 31 46 20 21 26 ff 7f 81 02 b4 09 30 45 00 26 ff 3f 81 42 09 3d 15 81 25…
1492 "uhid test XPPen Artist 24 28bd 093a",
1493 …46 f0 50 26 ff 7f 81 02 09 31 46 91 2d 26 ff 7f 81 02 b4 09 30 45 00 26 ff 1f 81 42 09 3d 15 81 25…
1499 hid_bpfs = [HidBpf("Huion__Kamvas-Pro-19.bpf.o", True)]
1504a 09 20 a1 01 09 42 09 44 09 43 09 3c 09 45 15 00 25 01 75 01 95 06 81 02 09 32 75 01 95 01 81 02 …