Open josephernest opened 2 years ago
It seems it comes from https://github.com/boppreh/keyboard/blob/master/keyboard/_winkeyboard.py#L372
name_ret = GetKeyNameText(scan_code << 16 | is_extended << 24, name_buffer, 1024)
and GetKeyNameTextW
seems to be always in localized lang.
Linked topic: https://stackoverflow.com/questions/7416779/force-getkeynametext-to-english
I agree with it, and I'm working on it on a separate branch (see for example https://github.com/boppreh/keyboard/commit/275b3b466cb71b904aa02c8911e242e5a4b180af ).
The challenge is getting all of these types of keys right:
There are some 4 different ways of getting key names in Windows, and each of them gives good results for some keys, but awful results for others.
Regarding localized keys, it's good to at least keep track of them, so that if the user creates a hotkey 'maj+haut' the library knows what to do with it.
Thanks for your answer and congrats again for your lib @boppreh.
Would you know a quick hack to set English everywhere at least for keyboard.read_event().name
?
Congrats for this library! With
I get
How to disable localization and get only English event names, even on a French Windows?