mousetrap
mousetrap copied to clipboard
Shortcuts with 2 keys block shortcuts with three
Say you have a shortcut for g s
and one for g s p
. g s p
won't work as the library triggers the callback as soon as it gets to g s
and then resets. I tested this with the latest version (1.6.0
) and tried older versions down to 1.4.2
but the result was the same.
http://codepen.io/anon/pen/rrmyAY?editors=0010
I resolved this issue by going the keyCode route with vanilla JS. Would be helpful if someone could update the code to prevent the issue you stated...
@juanparadox you might wanna check out https://github.com/shopify/hotshot to use until Mousetrap has implemented a fix.
@juanparadox could you specify in code how you resolve this issue? Maybe a demo. Thanks in advance
@ntoscomeli I basically just captured the keystrokes using key event listeners and debouncing the clicks. Unfortunately, I don't have a demo and apologies for replying so late.