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
On my Mac keyboard.is_pressed('escape') works, keyboard.is_pressed('f') does not.
File "/opt/homebrew/lib/python3.11/site-packages/keyboard/__init__.py", line 324, in key_to_scan_codes
raise ValueError('Key {} is not mapped to any known key.'.format(repr(key)), e)
ValueError: ("Key 'f' is not mapped to any known key.", ValueError('Unrecognized character: f'))
The latter dicts values are not set in KeyMap class __init__
for key_code in range(0, 128):
non_shifted_char = UniChar4()
shifted_char = UniChar4()
keys_down = ctypes.c_uint32()
char_count = UniCharCount()
I have tried just filling the constructor parameters, but it is not sufficient - it does prevent the error, but keyboard.is_pressed('f') still does not work.
The text was updated successfully, but these errors were encountered:
On my Mac
keyboard.is_pressed('escape')
works,keyboard.is_pressed('f')
does not.Digging through code I have found that:
prints
The latter dicts values are not set in
KeyMap
class__init__
I have tried just filling the constructor parameters, but it is not sufficient - it does prevent the error, but
keyboard.is_pressed('f')
still does not work.The text was updated successfully, but these errors were encountered: