You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for the report. I can reproduce this issue, but it's strange. For the moment, a workaround is to use write('hello world', exact=False). This will send actual key events instead of typing the characters with OS-specific typing commands. It'll keep you from using characters not present in your keyboard, but fixes the double-letter issue.
Notes:
this only happens on Windows.
this only happens if using exact=True (which is the default option in Window), which relies on _os_keyboard.type_unicode.
putting a delay between events fixes the problem, but the delay required is enormous (e.g. write('hello world', delay=0.2)), with larger and larger requires for more repeated characters in a row.
Found the problem. The "typing" events we use are different from key presses, and meant for alternative inputs like speech or handwriting. It allows programs to feed pieces of text to other programs, almost but not quite as if it was typed by a keyboard.
I believed those events were self-contained and stateless, but apparently they count as "key presses", and require a "key release". Just like you can type "ab" by holding "a" and pressing "b", keyboard was sending many "key press" events and no "key release", which kinda works but doesn't allow you to type repeated keys.
The solution was to duplicate all typing events, pairing them up with key releases.
If the problem persists, or if you find some related issue, feel free to comment here and I'll reopen the issue.
Having an issue where double letters are only typed once. Reproduced this error on two different PC's. Any experience with this?
The text was updated successfully, but these errors were encountered: