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
Tl;dr: There is no current way to prevent this. However a solution does exist, I just don't have the time or energy to implement it currently. If you're able to contribute, that would be more than awesome 🤠 😸.
Here's some more detail about this issue:
The current matching logic is greedy.
Meaning that if a hotkey is a direct subset of another hotkey, the subset hotkey logic will always fire.
A hotkey binding is represented as a HashSet of keys. Using your example, let hotkey A be set("tab") and hotkey B be set("shift", "tab"). Since A is a subset of B, when we match, A will always be fired over B.
The solution
#2 is a feature request directly for this use case. The trick is to introduce some window of time after the first key press. We wait for all the other keys to be pressed and once that window is up, we can evaluate it.
Let me know if you want to work on this! This would be a major upgrade to what we currently have.
I've got two hotkey handlers:
Whenever I press Shift+Tab, the tab handler fires as well. Is there a way to prevent this?
The text was updated successfully, but these errors were encountered: