mousetrap
mousetrap copied to clipboard
Support for Double Tap Letters?
It'd be cool if this could support double tap for letters on the keyboard. Example use case: when a user hits the right arrow once, a video fast forwards by 10 seconds. When a user double hits the right arrow, it'll fast forward the video by 30 seconds. This way the user has 2 options with 1 key.
Doesn't declaring one shortcut for "right" and one for "right right" work ?
Unfortunately not. The shortcut that is declared later will override the previous one. You can see the effect here: https://jsfiddle.net/Lp33nyLr/
Oh, I had misread: didn't notice you wanted both "right" and "right right". That falls under #372 then, I guess.