-
Since I am creating a js site where I have to add some sort of keybinding can anyone help to set that? |
Beta Was this translation helpful? Give feedback.
Answered by
getlost01
Jan 22, 2023
Replies: 1 comment
-
Here is an example of how you can set up keybinding using the You can also use
This code will also listen for the |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Castonati
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is an example of how you can set up keybinding using the
keyup
event in JavaScript:You can also use
event.key
to check what key has been pressed.This code will also listen for the
keyup
event on the entire document, and check the event.key property to see which key was pressed.