-
Notifications
You must be signed in to change notification settings - Fork 434
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
add_hotkey keeps bound keys pressed throughout the callback function #135
Comments
(Sorry for the responding earlier, I had typed an extensive reply but apparently failed to send.) I'm not sure I understand 100% the issue, so let me try to reword it; the following snippet currently prints import keyboard
keyboard.add_hotkey('ctrl+a', lambda: print(keyboard.is_pressed('a')), suppress=True, trigger_on_release=True) Because that does sound like a bug. Note:
|
If my understand of the issue is correct, can you test if the commit above fixes it? |
Yes! it does. |
Awesome, thank you for testing. |
Hi! Thanks for this lib. I'm using it pretty extensively.
I nailed down exactly the situations where this bug occurs, and when it doesn't.
An example for the bug: Given hotkey: 'ctrl+l', sending 'alt' in the callback fn will send ctrl+alt+l, even if 'ctrl+l' was physically released, trigger_on_release is set to True, as so is suppress.
I checked that via is_pressed.
Results:
reproduce.txt
Hopefully that sheds some light on the issue!
Thanks again,
Gilad
The text was updated successfully, but these errors were encountered: