Free tools that run in your browser. Use any tool without an account.

Favourites Cart
Sign in
Join free

Keycode Finder

JavaScript key inspector

  • Free
  • Nothing stored
  • No account needed

Keycode Finder shows event.key, event.code, keyCode and which, key location and modifiers for any key you press, plus a 12-entry history and ready-to-copy keydown code. Example: pressing A shows keyCode 65.

Runs in your browser. Your files and values are not sent to us. Report a problem
Advertisement

About the Keycode Finder

Keycode Finder is a simple browser tool that shows the raw values a JavaScript KeyboardEvent reports. You press or tap a key and the tool shows event.key, event.code, legacy keyCode and which, the key location and held modifiers, plus a history of the last 12 key events. Developers, QA testers and accessibility auditors use it to check shortcuts, map controls or debug layout issues. The tool runs entirely in your browser and sends nothing to a server, so no uploads occur. It also includes a tap field for phones so you can test virtual keyboards. Compared with some tools, this one keeps a short history and supplies a ready-to-copy keydown code snippet for the pressed key, saving you time when wiring shortcuts or writing tests.

How to use it

  1. 1Press any physical key or click the tap field for on-screen keyboards.
  2. 2Read event.key, event.code, keyCode, which, location and modifier flags.
  3. 3Use the 12-entry history to compare recent keys.
  4. 4Click the ready-to-copy keydown code to paste into your project.
Advertisement

Worked example

Input: press the A key on a US keyboard. Result: event.key = "a", event.code = "KeyA", keyCode = 65, which = 65, location = 0, modifiers = none. The history records the entry and shows a ready-to-copy keydown code snippet.

How it works

Shows the JavaScript event.key, event.code, keyCode and which values, the key location (left, right, numpad) and held modifiers for any key you press, with a history of the last 12 keys and ready-to-copy keydown codeWorks with phone keyboards through a tap fieldWorks in the browser with nothing to install

Source: W3C UI Events KeyboardEventMDN KeyboardEvent.key and KeyboardEvent.code. Last checked 7 November 2026.

What it is good for

  • Shows key, code and legacy keyCode at a glance.
  • Keeps a 12-item history for quick comparison.
  • Includes a tap field so phones can be tested.
  • On-screen Android keyboards often report keyCode 229 or Unidentified during IME composition.
  • keyCode is legacy and may differ by platform; prefer event.key or event.code.
Advertisement

Questions people ask

What is the difference between event.key and event.code?

event.key is the character or key name after layout and modifiers. event.code identifies the physical key position and stays the same across layouts. Use key for text and code for physical-key shortcuts.

Is keyCode reliable for new projects?

No. keyCode is a legacy property and may vary by browser and platform. Use event.key or event.code instead for reliable behavior.

Why do I sometimes see keyCode 229 or key Unidentified?

Those values usually mean an input method editor is composing text or a virtual keyboard is in use. Check event.isComposing or use composition and input events for text entry.

Should I listen to keydown or keyup for shortcuts?

Listen to keydown for shortcuts because it fires repeatedly and you can call preventDefault. Use keyup if the action must occur on key release.

Can I test mobile keyboards with this tool?

Yes. The tool has a tap field so you can open a phone keyboard and tap keys. Note that many virtual keyboards do not report physical key codes reliably.

Does this tool upload what I type?

No. The tool runs entirely in your browser and does not send key events or typed data to a server.

Help keep every tool free

FreeToolr stays free because people help it grow. Share a tool you like, tell us what to build next, or support us on Ko-fi.

Advertisement
Advertisement