Lines Matching full:pen
29 PEN = libevdev.EV_KEY.BTN_TOOL_PEN variable in ToolType
41 """Pen states according to Microsoft reference:
42 https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/windows-pen-states
48 PEN_IS_IN_RANGE = BtnTouch.UP, ToolType.PEN, None
49 PEN_IS_IN_RANGE_WITH_BUTTON = BtnTouch.UP, ToolType.PEN, BtnPressed.PRIMARY_PRESSED
52 ToolType.PEN,
55 PEN_IS_IN_CONTACT = BtnTouch.DOWN, ToolType.PEN, None
58 ToolType.PEN,
63 ToolType.PEN,
342 """This is the first half of the Windows Pen Implementation state machine:
344 … https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/windows-pen-states
368 """This is the second half of the Windows Pen Implementation state machine:
371 … https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/windows-pen-states
406 """We revisit the Windows Pen Implementation state machine:
455 """We revisit the Windows Pen Implementation state machine:
505 """This is not adhering to the Windows Pen Implementation state machine
518 """This is the second half of the Windows Pen Implementation state machine:
521 … https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/windows-pen-states
535 For example, a pen that has the eraser button might wobble between
570 class Pen(object): class
631 application="Pen",
650 def move_to(self, pen, state): argument
652 if pen.current_state == PenState.PEN_IS_OUT_OF_RANGE:
653 pen.restore()
655 print(f"\n *** pen is moving to {state} ***")
658 pen.backup()
659 pen.x = 0
660 pen.y = 0
661 pen.tipswitch = False
662 pen.tippressure = 0
663 pen.azimuth = 0
664 pen.inrange = False
665 pen.width = 0
666 pen.height = 0
667 pen.invert = False
668 pen.eraser = False
669 pen.xtilt = 0
670 pen.ytilt = 0
671 pen.twist = 0
672 pen.barrelswitch = False
673 pen.secondarybarrelswitch = False
675 pen.tipswitch = False
676 pen.inrange = True
677 pen.invert = False
678 pen.eraser = False
679 pen.barrelswitch = False
680 pen.secondarybarrelswitch = False
682 pen.tipswitch = True
683 pen.inrange = True
684 pen.invert = False
685 pen.eraser = False
686 pen.barrelswitch = False
687 pen.secondarybarrelswitch = False
689 pen.tipswitch = False
690 pen.inrange = True
691 pen.invert = False
692 pen.eraser = False
693 pen.barrelswitch = True
694 pen.secondarybarrelswitch = False
696 pen.tipswitch = True
697 pen.inrange = True
698 pen.invert = False
699 pen.eraser = False
700 pen.barrelswitch = True
701 pen.secondarybarrelswitch = False
703 pen.tipswitch = False
704 pen.inrange = True
705 pen.invert = False
706 pen.eraser = False
707 pen.barrelswitch = False
708 pen.secondarybarrelswitch = True
710 pen.tipswitch = True
711 pen.inrange = True
712 pen.invert = False
713 pen.eraser = False
714 pen.barrelswitch = False
715 pen.secondarybarrelswitch = True
717 pen.tipswitch = False
718 pen.inrange = True
719 pen.invert = True
720 pen.eraser = False
721 pen.barrelswitch = False
722 pen.secondarybarrelswitch = False
724 pen.tipswitch = False
725 pen.inrange = True
726 pen.invert = False
727 pen.eraser = True
728 pen.barrelswitch = False
729 pen.secondarybarrelswitch = False
731 pen.current_state = state
733 def event(self, pen): argument
735 r = self.create_report(application=self.cur_application, data=pen)
774 def post(self, uhdev, pen): argument
775 r = uhdev.event(pen)
781 self, from_state, pen, evdev, events, allow_intermediate_states argument
784 pen.assert_expected_input_events(evdev)
807 to wobble a little the X,Y coordinates of the pen
814 p = Pen(50, 60)
848 """This is the first half of the Windows Pen Implementation state machine:
850 … https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/windows-pen-states
863 """This is not adhering to the Windows Pen Implementation state machine
913 """This is the second half of the Windows Pen Implementation state machine:
916 … https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/windows-pen-states
933 """This is the second half of the Windows Pen Implementation state machine:
936 … https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/windows-pen-states
952 For example, a pen that has the eraser button might wobble between
959 def event(self, pen): argument
963 internal_pen = copy.copy(pen)
965 # bug in the controller: when the pen touches the
967 # the pen moves in-range gets reverted to 0
968 if pen.tipswitch and self.prev_tip_state:
971 self.prev_tip_state = pen.tipswitch
973 # another bug in the controller: when the pen is
975 # the pen touches the surface, eraser is correctly
977 if pen.eraser:
1144 # Windows 8 compatible devices with USI Pen