Skip to content
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

is_modifier and keyboard.get_hotkey_names don't work with non-english names #516

Open
Avasam opened this issue Dec 16, 2021 · 0 comments
Open

Comments

@Avasam
Copy link
Contributor

Avasam commented Dec 16, 2021

Here "left shift" is called "maj".

>>> import keyboard
>>> keyboard.read_event(True)
KeyboardEvent(maj down)
>>> keyboard.is_modifier(keyboard.read_event(True).name)
False
>>> import keyboard
>>>keyboard.get_hotkey_name(['ctrl', 'maj', 'D'])
KeyboardEvent(maj down)
'ctrl+D+maj'

Workaround: manually use keycodes instead
keyboard.is_modifier(keyboard.read_event(True).scan_code)

@Avasam Avasam changed the title is_modifier does not work with non-english names is_modifier and keyboard.get_hotkey_names don't work with non-english names Dec 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant