-
Notifications
You must be signed in to change notification settings - Fork 119
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
[BUG] Currently pressed key is not removed if shift is released first #1064
Comments
After a bit of investigation, this sort of makes sense. When pressing combo keys, the following is (roughly) registered:
This is on a en-US keyboard, but I suspect it's true for any
Not sure how best to fix this, as I don't fully understand the entire implementation logic. Incidentally, pressing |
I solved this by doing the same as for the command key. On macOS the keyup event of letters and digits is not triggering while holding the command key down. That's why you can't just remove single keys of the array but need to clear it. The way I solved this also worked for the shift key! Set a timeout each time shift is pressed. When it is released, instead of trying to remove the specific characters which were pressed with the shift key, the array of pressed keys is cleared completely. This ensures that you have no characters left in the pressed keys array. |
Yes this is currently a problem, because the library mixes the produces symbol with the produced key code. This will be fixed in version 5. |
This is a layout specific problem that gets addressed in version 5. This has been fixed in pre release 5.0.0-1. Please try out this version. Please let me know if that fixes your issue. |
It seems like the property should prolly be |
I'd be happy to update your changes from the 5.0.0-1 branch if that sounds right to you |
Describe the bug
The order in which combo keys are released matters, when it should not.
To Reproduce
shift+?
hotkeyshift
, press?
, releaseshift
first, release?
secondshift
again?
is not pressedCodeSanbdox Repro
Expected behavior
Hotkey should not trigger again on
shift
only, since?
is not pressed anymoreScreenshots
The text was updated successfully, but these errors were encountered: