treasure

@treasure@lemmy.blahaj.zone
0 Post – 1 Comments
Joined 4 months ago

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.