JavaScript Key Event Codes
Building a game or keyboard shortcut? This tool detects any keypress and displays the JavaScript Event.key, Event.code, and legacy keyCode associated with it.
Data Displayed
- event.key: The character generated.
- event.code: The physical key on the keyboard.
- event.which: The numeric code (deprecated but useful).
How to Use
- Focus the window.
- Press any key on your keyboard.
- See the codes appear instantly on screen.