JavaScript Keycode: Code of Any Key Pressed
Press a key to get its JavaScript key, code, keyCode and modifiers.
Press any key…
🔒 100% client-side — no data sent
Press a key and instantly get its JavaScript key, code, keyCode and which values. Perfect for coding keyboard shortcuts and event listeners. Everything happens in the browser; no keystroke is logged online.
What is it for?
- ▸ Find a key's code for a keyboard shortcut
- ▸ Debug a keydown or keyup event listener
- ▸ Compare key, code and keyCode for the same key
- ▸ Identify special keys (Enter, Escape, arrows)
FAQ
Difference between key, code and keyCode?
key gives the produced character, code identifies the physical key regardless of layout, keyCode is a deprecated numeric value.
Is keyCode still usable?
It still works but is deprecated; prefer key or code for modern code.
Are my keystrokes logged?
No, everything stays local in your browser.