Keycode Inspector illustration

Keycode Inspector

Shows exactly what JavaScript sees when you press a key: event.key, event.code, the deprecated keyCode, location and modifier states — with a history of recent presses for comparing keys and layouts.

Runs 100% in your browser — nothing you paste leaves your device.

Notes

  • event.code identifies the physical key position (KeyY is the same key on QWERTY and QWERTZ); event.key gives the character the layout produces.
  • keyCode is deprecated and inconsistent across keyboard layouts — new code should use key or code.
  • Runs 100% in your browser — nothing you paste leaves your device.

Explore the idea

This interactive demo needs JavaScript.