moses-palmer / pynput

Sends virtual input commands
GNU Lesser General Public License v3.0
1.77k stars 245 forks source link

Arrow keys do not function right in darwin_intercept. #484

Open SpecialCharacter opened 2 years ago

SpecialCharacter commented 2 years ago

Description Placement of the cursor is not aligned with where a new character gets inserted. This seems a different issue than #440 .

Platform and pynput version MacOS Catalina 10.15.7 pynput version unknown

To Reproduce It does not matter whether I type

keyboard.Controller().press(Key.left)
keyboard.Controller().release(Key.left) [x 3]

or keyboard.Controller().tap(Key.left), [x 3] the placement of cursor (i) is not aligned with where a new character gets inserted (e) with Quartz.CGEventKeyboardSetUnicodeString. Example: Expected behaviour: naive --> naïve Reality: naive --> naivë