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
After a bit of investigation, this sort of makes sense. When pressing combo keys, the following is (roughly) registered:
Add shift
Add ?
Remove shift
Remove / <= that's the issue ; it's because without the shift, the ? key is now registered as a / key. So ? is never removed from the currently pressed keys, and any press to shift triggers the combo again.
This is on a en-US keyboard, but I suspect it's true for any shift combo on any keyboard. The particular key here is:
┌─────┐
│ ? │
│ / │
└─────┘
Not sure how best to fix this, as I don't fully understand the entire implementation logic.
Incidentally, pressing / then shift, which should (could?) produce the shift+?, does not work either.
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.
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: