-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No cyrillic keyboard input and typing for Linux #193
Comments
That seems like a strange bug; there is even a test for it here. Does running the test suite fail as well? |
That test fails on my system: FAIL: test_type_nonascii (tests.keyboard_controller_tests.KeyboardControllerTest) Traceback (most recent call last): Ran 17 tests in 5.124s FAILED (failures=1) |
Thank you for your help! What output do you get from |
I'm not sure I know how to get the data. |
Perhaps the following script would suffice? import pynput, time
time.sleep(5)
pynput.keyboard.Controller().type('абв') Run the script and quickly select the xev window. |
For outputKeyPress event, serial 49, synthetic YES, window 0x5600001, root 0x72b, subw 0x0, time 0, (0,0), root:(0,0), state 0x0, keycode 8 (keysym 0x0, NoSymbol), same_screen NO, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: FalseKeyRelease event, serial 58, synthetic YES, window 0x5600001, KeyPress event, serial 67, synthetic YES, window 0x5600001, KeyRelease event, serial 76, synthetic YES, window 0x5600001, KeyPress event, serial 85, synthetic YES, window 0x5600001, KeyRelease event, serial 94, synthetic YES, window 0x5600001, For outputKeyPress event, serial 40, synthetic YES, window 0x4600001, root 0x72b, subw 0x0, time 0, (0,0), root:(0,0), state 0x0, keycode 38 (keysym 0x61, a), same_screen NO, XLookupString gives 1 bytes: (61) "a" XmbLookupString gives 1 bytes: (61) "a" XFilterEvent returns: FalseKeyRelease event, serial 40, synthetic YES, window 0x4600001, KeyPress event, serial 40, synthetic YES, window 0x4600001, KeyRelease event, serial 40, synthetic YES, window 0x4600001, KeyPress event, serial 40, synthetic YES, window 0x4600001, KeyRelease event, serial 40, synthetic YES, window 0x4600001, |
Found out it crashes when trying to |
Is your encoding set to Unicode or to ISO-whatever? |
I use Manjaro Linux with Plasma DE and X.org Server 1.20.5. There are US English and Russian keyboard layouts on my system.
pynput work ok with US English but with Russian:
q
instead ofй
which is on the same key;pynput.keyboard.Controller().type('абв')
does nothingxev output for `абв` looks ok...
KeyPress event, serial 40, synthetic NO, window 0x6600001, root 0x6ce, subw 0x0, time 1433257, (-446,410), root:(472,447), state 0x2000, keycode 41 (keysym 0x6c1, Cyrillic_a), same_screen YES, XLookupString gives 2 bytes: (d0 b0) "а" XmbLookupString gives 2 bytes: (d0 b0) "а" XFilterEvent returns: FalseKeyRelease event, serial 40, synthetic NO, window 0x6600001,
root 0x6ce, subw 0x0, time 1433335, (-446,410), root:(472,447),
state 0x2000, keycode 41 (keysym 0x6c1, Cyrillic_a), same_screen YES,
XLookupString gives 2 bytes: (d0 b0) "а"
XFilterEvent returns: False
KeyPress event, serial 40, synthetic NO, window 0x6600001,
root 0x6ce, subw 0x0, time 1433713, (-446,410), root:(472,447),
state 0x2000, keycode 59 (keysym 0x6c2, Cyrillic_be), same_screen YES,
XLookupString gives 2 bytes: (d0 b1) "б"
XmbLookupString gives 2 bytes: (d0 b1) "б"
XFilterEvent returns: False
KeyRelease event, serial 40, synthetic NO, window 0x6600001,
root 0x6ce, subw 0x0, time 1433793, (-446,410), root:(472,447),
state 0x2000, keycode 59 (keysym 0x6c2, Cyrillic_be), same_screen YES,
XLookupString gives 2 bytes: (d0 b1) "б"
XFilterEvent returns: False
KeyPress event, serial 40, synthetic NO, window 0x6600001,
root 0x6ce, subw 0x0, time 1434147, (-446,410), root:(472,447),
state 0x2000, keycode 40 (keysym 0x6d7, Cyrillic_ve), same_screen YES,
XLookupString gives 2 bytes: (d0 b2) "в"
XmbLookupString gives 2 bytes: (d0 b2) "в"
XFilterEvent returns: False
KeyRelease event, serial 40, synthetic NO, window 0x6600001,
root 0x6ce, subw 0x0, time 1434227, (-446,410), root:(472,447),
state 0x2000, keycode 40 (keysym 0x6d7, Cyrillic_ve), same_screen YES,
XLookupString gives 2 bytes: (d0 b2) "в"
XFilterEvent returns: False
The text was updated successfully, but these errors were encountered: