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
("up" may be substituted with "up arrow", "down", "down arrow", "left", "left arrow", "right", or "right arrow" to get the same result).
After running this, pressing the specified arrow key works as expected and calls the callback. Pressing literally any other key on the keyboard, however, raises an error with the following traceback:
Traceback (most recent call last):
File "C:\Python36-32\lib\site-packages\keyboard\_generic.py", line 23, in invoke_handlers
if handler(event):
File "C:\Python36-32\lib\site-packages\keyboard\__init__.py", line 296, in handler
unexpected = not any(matches(event, part) for part in steps[state.step])
File "C:\Python36-32\lib\site-packages\keyboard\__init__.py", line 296, in <genexpr>
unexpected = not any(matches(event, part) for part in steps[state.step])
File "C:\Python36-32\lib\site-packages\keyboard\__init__.py", line 152, in matches
return matched_name or _os_keyboard.map_char(normalized)[0] == event.scan_code
File "C:\Python36-32\lib\site-packages\keyboard\_winkeyboard.py", line 447, in map_char
raise ValueError('Key name {} is not mapped to any known key.'.format(repr(name)))
ValueError: Key name 'up' is not mapped to any known key.
On further inspection, this seems to be because the key names in to_scan_code are localized (wtf, Windows?). It seems to be issue #12 coming back to bite you again! I suppose you fixed the ability to add keys with localized key names - just not without every other key breaking. 😉
The text was updated successfully, but these errors were encountered:
This simple line of code causes big problems on my system:
("up" may be substituted with "up arrow", "down", "down arrow", "left", "left arrow", "right", or "right arrow" to get the same result).
After running this, pressing the specified arrow key works as expected and calls the callback. Pressing literally any other key on the keyboard, however, raises an error with the following traceback:
On further inspection, this seems to be because the key names in
to_scan_code
are localized (wtf, Windows?). It seems to be issue #12 coming back to bite you again! I suppose you fixed the ability to add keys with localized key names - just not without every other key breaking. 😉The text was updated successfully, but these errors were encountered: