What is JavaScript Keycode Inspector Online?
JavaScript keyboard events expose multiple properties per key press. event.key returns the character or name ("a", "Enter"). event.code returns the physical key position ("KeyA", "Enter"). event.keyCode (deprecated) returns a numeric code. This tool captures all values live.
How to Use JavaScript Keycode Inspector Online
- Click in the capture area.
- Press any key.
- All event properties are displayed instantly.
Frequently Asked Questions
Difference between event.key and event.code?
event.key reflects the character produced (affected by Shift/locale). event.code reflects the physical key position. Prefer event.key for input; event.code for shortcuts.