To detect two keystrokes closely followed, you can use EventListeners for the onkeyup/onkeydown event. In combination with a variable that determines if the key was already pressed within the last 100 ms and a setTimeout call that resets that variable after 100 ms, it should be fairly easy to accomplish.
To detect two keystrokes closely followed, you can use
EventListener
s for theonkeyup
/onkeydown
event. In combination with a variable that determines if the key was already pressed within the last 100 ms and asetTimeout
call that resets that variable after 100 ms, it should be fairly easy to accomplish.