Home › Developer Tools › Keycode Finder

⌨️ Keycode Finder

Press any key to see its JavaScript key, code and keyCode values instantly.

Click here, then press any key ⌨️

About this Keycode Finder

Building a keyboard shortcut, a game or a form that reacts to Enter and Escape? This tool shows the three values JavaScript reports for any key you press: the modern event.key (what the key means), event.code (where the key physically sits) and the legacy event.keyCode number, plus modifier states.

How to use it

  1. Click the dashed box to give it keyboard focus.
  2. Press any key — letters, arrows, function keys, anything.
  3. Read its key, code and keyCode in the result panel.
  4. Press more keys to compare them.

Example

Pressing the A key shows key: a, code: KeyA and keyCode: 65; holding Shift and pressing A shows key: A with the same code and keyCode.

Frequently asked questions

What is the difference between key and code?

key is the character produced (it changes with Shift and keyboard layout), while code is the physical position on a US keyboard, like KeyA. Games usually want code; text handling wants key.

Why is keyCode marked legacy?

keyCode is deprecated — browsers still report it, but new code should use key or code, which are clearer and layout-aware.

More Developer Tools