↑

Free Keycode Tester

What this tool does

The Keycode Tester shows exactly what your keyboard sends to the browser. Click the box and press any key — or a combination like Ctrl + K — to see event.key, event.code, the legacy keyCode and which values, key location, and modifier states. A running history lists your recent keys, and one click copies the full event details for your code. Free and private, right in your browser.

Press any key
Click the box first so it has focus, then press keys — including combinations like Ctrl + K. Keys are captured locally; nothing is sent anywhere.
-
event.key
-
event.code
-
keyCode
-
which
Event details
Key history
No keys pressed yet.

Let us know

Please share your experience with this tool.

Thanks for rating!
No ratings yet — be the first!

How do I use the keycode tester?

Click the big box so it has focus, then press any key. The box shows the key in large type, and the panels beside it show event.key, event.code, keyCode, which, the key location, and whether Ctrl, Alt, Shift or Meta were held. Try combinations like Ctrl + K or Shift + A. Your last 12 keys are kept in the history, and Copy event puts the full details on your clipboard for use in code or bug reports.

key vs code vs keyCode — what is the difference?

event.key is the character or named key the press produces ("a", “A” with Shift, “Enter”, “ArrowLeft”) — it changes with keyboard layout and modifiers. event.code names the physical key position ("KeyA", “Digit1”, “Space”) and stays the same on every layout, which makes it ideal for games. keyCode and which are legacy numeric values (A=65, Enter=13) from before these properties existed; they are deprecated but still appear in older code, so this tool shows them for reference.

What are modifier keys and location?

Modifiers are Ctrl, Alt, Shift and Meta (the Windows or Command key). Shortcuts are built from them: Ctrl + S, Alt + Tab, Cmd + K. Location tells you which copy of a duplicated key was pressed: Left or Right for Shift/Ctrl/Alt pairs, Numpad for the numeric keypad, and Standard for everything else. Games and shortcut systems use location to treat left and right Shift as different keys.

Why do developers need keycodes?

Keyboard shortcuts in web apps (press “/” to search, Esc to close), game controls (WASD movement), accessibility features, form handling (Enter to submit), and debugging “my shortcut does not work on a French keyboard” reports — all of these start with knowing what the browser actually received. A keycode tester is the fastest way to check, without writing a line of code.

Common keycodes reference

Enter=13, Escape=27, Space=32, Backspace=8, Tab=9, Delete=46. Arrow keys: Left 37, Up 38, Right 39, Down 40. Letters A–Z are 65–90 and digits 0–9 are 48–57 in keyCode terms. Function keys F1–F12 are 112–123. Remember that modern code should prefer event.key and event.code — use these numbers only when maintaining legacy code.

Is it free and private?

Yes. The keycode tester is completely free, needs no sign-up, and runs entirely in your browser. Key presses are processed locally and never uploaded or stored — safe even for testing password-style combinations (though you should never type a real password into any tool). It works on phones with external keyboards, tablets and desktop computers.

FAQs

How does the keycode tester work?

Click the box to focus it, then press any key. It shows event.key, event.code, keyCode, which, location and modifier states.

What is the difference between key and code?

key is the character produced (changes with layout and Shift); code is the physical key position (same on all layouts).

Is keyCode deprecated?

Yes. Modern code should use event.key and event.code, but keyCode and which are shown here for legacy code.

Can it detect mouse clicks?

No — it captures keyboard events only, including modifier combinations like Ctrl + K.

Is my data uploaded to a server?

No. Key presses are processed in your browser and never uploaded or stored.

Is it free?

Yes, completely free with no sign-up. Everything runs in your browser.


Author

Awais Arshad

Web Tools Developer & Content Creator at FastToolKit.