tomai
Free · Developer Tools

Keycode Info

Press any key — see its key, code and keyCode instantly

⌨️
Click here, then press any key
key
code
keyCode
which
location

✦ Three names for every keypress

A single keypress produces three identifiers: key (the character, layout-dependent), code (the physical position, layout-independent) and the legacy keyCode number. Confusing them is the classic hotkey bug — shortcuts that work on your QWERTY break on a teammate's AZERTY because you read key where you needed code.

What this tool does

  • ⌨️ Shows key, code, keyCode, which and location for any press
  • 🔍 Distinguishes left/right modifiers and numpad keys
  • 📋 Values update live, ready to copy into code
  • ⚡ Zero setup — click and press

When to use it

  • Debugging why a shortcut fires (or doesn't)
  • Writing layout-independent game controls
  • Checking what a exotic keyboard actually sends

Privacy: keypresses are read locally and displayed — nothing is recorded or sent anywhere.

Last updated · 2026-09-01

How inspection works

Native KeyboardEvent properties are read directly (key/code/keyCode/which/location) with a friendly Space label and left/right/numpad location decoding. Listeners sit on both the catcher and the document, so presses register anywhere reasonable.

Why inspect keys here?

⌨️

All five identifiers at once

key, code, legacy keyCode, which and location render together per press — the full picture other testers split across tabs.

🔍

Modifier-aware

Left vs right Shift/Ctrl/Alt and numpad keys report their distinct codes and locations, the exact detail shortcut bugs hide in.

📋

Zero friction debugging

No form, no button: click the catcher and press. Values stay on screen for copying straight into event handlers.

Frequently asked questions

key vs code — what's the difference?

key is what the keystroke produces (layout-dependent: q on QWERTY, a on AZERTY for the same physical key), while code names the physical key position (KeyQ) regardless of layout. Games and hotkeys should listen to code.

Is keyCode deprecated?

Yes, officially — but every framework and old tutorial still prints it, so this page shows it alongside the modern values for cross-checking.

Why do left and right Shift differ?

They share the key name but report different codes (ShiftLeft vs ShiftRight) and location values (1 vs 2) — exactly the detail you need when binding modifier-specific shortcuts.

Frequently asked questions

key vs code — what's the difference?

key is what the keystroke produces (layout-dependent: q on QWERTY, a on AZERTY for the same physical key), while code names the physical key position (KeyQ) regardless of layout. Games and hotkeys should listen to code.

Is keyCode deprecated?

Yes, officially — but every framework and old tutorial still prints it, so this page shows it alongside the modern values for cross-checking.

Why do left and right Shift differ?

They share the key name but report different codes (ShiftLeft vs ShiftRight) and location values (1 vs 2) — exactly the detail you need when binding modifier-specific shortcuts.

Related tools

Related tools