Keyboard Key Code Finder Online — Find Key Codes for Any Key Free

CodexFuse Team · 2026-10-31T21:07:33.166Z · 8 min read min read

Press any key and instantly see its key code, physical code and numeric value — then fix broken shortcuts with a real worked example.

A keyboard key code finder is a free online tool that shows you the exact code a browser assigns to every key you press. Open the tool, press a key, and it instantly displays the key name, its physical code, and the numeric code your JavaScript can listen for.

That sounds trivial until a shortcut works on your keyboard and fails on someone else's. A single wrong code can break a save shortcut or trap a user in a modal. This guide shows how to find the right code and test shortcuts without guessing.

Why do key codes still matter when keyCode is deprecated?

Key codes still matter because browsers still fire them, older code still depends on them, and modern replacements do not always answer the same question. The modern event.key tells you what character was produced, while event.code tells you which physical key was pressed, and the older numeric code remains the value many tutorials, libraries, and legacy handlers still check.

What exactly does the finder show you?

When you press a key, the browser creates a keyboard event. The finder surfaces its properties together so you can compare them without logging events by hand.

Value shownWhat it meansExample for the S key
keyThe character or named key produceds (or S with Shift)
codeThe physical key position, layout-independentKeyS
keyCodeThe legacy numeric code83
whichAn older numeric alias, often equal to keyCode83
locationWhich copy of the key was pressed, for example left or right Shift0 for a standard key
Important

Do not hard-code a numeric code without checking it in the browser you are targeting. Some keys, especially on international layouts and laptops with compact keyboards, report different values from the ones in a tutorial written for a US layout.

How do you use this keyboard key code finder?

Using this keyboard key code finder is deliberately simple. The live tool page describes it in two steps: press any key, then see the details. Its listed features are live key detection, full event details, and a history of the keys you have pressed.

  1. Open the tool and click into the page. The page needs focus before it can hear your key presses, so click anywhere in the main area first.
  2. Press one key at a time. Start with ordinary letters, then try Shift, Control, Alt, Escape, the arrow keys, and the function keys.
  3. Read all the values together. Note the key, the code, and the numeric code, not just one of them, so your handler can use the right property for the job.
  4. Check the history. Press a sequence, such as a shortcut combination, and use the history to confirm each key registered in the order you expected.
  5. Repeat on a second keyboard or layout if you can. A laptop keyboard, an external keyboard, and a different layout can all reveal surprises before your users do.

For full interactions, pair it with the JavaScript event tester. Note the tool page prompts you to log in or create a free account, so have an account ready before a debugging session.

A worked example: fixing a broken save shortcut

Consider Sara, a freelance front-end developer building a small notes app for a client. The client reports that Ctrl+S sometimes saves the note and sometimes opens the browser's save-page dialog instead. Sara suspects the handler is checking the wrong value, but she cannot prove it from the code alone.

She opens the keyboard key code finder and presses keys one at a time. Her first three results look like this:

Key pressedkeycodekeyCode
S on its ownsKeyS83
Shift + SSKeyS83
EscapeEscapeEscape27

The table confirms the diagnosis. The character changes with Shift, the physical code does not, and the numeric code stays at 83 in both cases. Sara's original handler checked only event.key === 's', so it missed Shift+S and, worse, it never called preventDefault() reliably for the combination the browser also claims.

She rewrites the handler to check event.code === 'KeyS' with event.ctrlKey, calls preventDefault() before saving, and re-tests the combination in the finder history. The dialog no longer appears and the note saves every time.

Pro Tip

Test modifier combinations as combinations, not as single keys. Press Ctrl first, hold it, then press S, and watch the history. A handler that works for S alone can still fail for Ctrl+S if the modifier state is not checked.

What goes wrong with key codes most often?

  • Assuming one layout fits all: a shortcut built around a US QWERTY character can land on a different physical key for AZERTY, QWERTZ, or Dvorak users.
  • Mixing up key and code: using key when you meant physical position, or code when you meant the character, produces shortcuts that feel random to users.
  • Trusting keyCode alone: the numeric code is deprecated, and some keys report 0 or an inconsistent value in modern browsers.
  • Forgetting preventDefault: if the browser already owns a combination, such as Ctrl+S or Ctrl+P, your handler must prevent the default action or both actions will fire.
  • Ignoring left versus right modifiers: left and right Shift, Control, and Alt can differ by location, which matters for games and accessibility tools.
  • Testing only on your own machine: laptop keyboards, compact layouts, and on-screen keyboards do not always report the same codes as a full-size desktop keyboard.
Stop guessing why your web app's shortcuts fail for some users

When a shortcut bug turns into a support ticket, the cost is not the code change — it is the lost trust. CodexFuse gives you a fully managed home for your app, on credits, so you can ship the fix, host it, and move on without babysitting a server.

Get Started with CodexFuse

How does this fit a real shipping workflow on CodexFuse?

Finding a key code is a five-minute task. Shipping an app whose shortcuts work for real users is longer: once Sara's fix passes, she still needs reliable hosting, business email for support, and backups if a deploy goes wrong.

On CodexFuse, that workflow is concrete. She deploys to managed hosting instead of configuring a server, sets up business email on the same platform, and keeps backups enabled so a bad deploy is reversible. Credits cover only what she uses, with no subscription tier to outgrow.

Suggested Reading

If you build keyboard-driven interfaces, the Arabic keyboard guide is a useful reminder of how layout assumptions break for users typing in another script, and the CSS button generator helps you build the visible controls those shortcuts should mirror.

What are the honest limits of a key code finder?

A keyboard key code finder reports what the browser sees, not what the operating system or hardware sees. It cannot tell you if a key is physically stuck, remapped by a driver, or intercepted by the operating system. If no app receives the key, the fault is below the browser.

Frequently Asked Questions

What is a keyboard key code?

A key code is the numeric identifier a browser historically assigned to a key press, such as 83 for S and 27 for Escape. It is now deprecated in favour of the key and code properties, but it still appears in older code and many tutorials.

How do I find the key code for any key?

Open the keyboard key code finder, click into the page, and press the key. The tool shows the key name, physical code, numeric code, and history in one view, so you can copy the exact value your handler needs.

Why is keyCode deprecated if it still works?

It was deprecated because numeric codes were inconsistent across layouts and devices, and they could not express every key cleanly. Modern properties separate the character produced from the physical key pressed, which removes much of that ambiguity.

Should I use key, code, or keyCode in new code?

Use key when the character matters, code when the physical position matters, and keyCode only when you must support legacy code. Checking the finder for all three values before you choose prevents the most common shortcut bugs.

Why does my shortcut work on my keyboard but not on another?

Different layouts place different characters on the same physical keys, and compact or laptop keyboards sometimes report different codes. Test the exact combination in the finder on each layout you support, and prefer code for position-based shortcuts.

Can a key code finder fix a broken keyboard?

No. It can prove whether the browser receives the key press, which narrows the fault to the browser, the operating system, or the hardware. If no app receives the key, the fault is hardware or driver-level and needs a physical fix or replacement.

Test the key, then ship the fix with confidence

Next time a shortcut misbehaves, do not rewrite the handler on a hunch. Open the finder, press the exact keys your user pressed, and read the exact values reported.

Then move the fixed app to a platform without server babysitting. Move your hosting to CodexFuse, set up business email and backups there, and pay only with credits for what you use.

Featured on Twelve Tools Launch Llama Tools Launch your MCP