-
Notifications
You must be signed in to change notification settings - Fork 432
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
Fix #585 Mac OS Ventura compatibility issue! #587
base: master
Are you sure you want to change the base?
Conversation
Tested with a Macbook Air M1 2020 model using latest Mac OS Ventura. |
command key is ok, but option key are still error. |
Mac OS Ventura 13.5.1 on MacBook Pro M2 Pro, still got “KeyboardEvent(Unknown 1 down)”, event.name is None |
But I can distinguish keyboard event by str(event) thought the event.name is still None. Anyway, thanks to your pr! key_event = keyboard.read_event()
if key_event.event_type == keyboard.KEY_DOWN:
if str(key_event) == "KeyboardEvent(shift down)":
print("press 'left shift'")
elif str(key_event) == "KeyboardEvent(right shift down)":
print("press 'left shift'")
if paused:
if str(key_event) == "KeyboardEvent(Unknown 34 down)":
print("press 'i'")
elif str(key_event) == "KeyboardEvent(Unknown 40 down)":
print("press 'k'")
elif str(key_event) == "KeyboardEvent(Unknown 38 down)":
print("press 'j'")
elif str(key_event) == "KeyboardEvent(Unknown 37 down)":
print("press 'l'") |
[fix bug for Mac OS Ventura where value of event.name is None]
Add a default layout for mac OS incase unable to detect the layout key code automatically