UtilityBox

Keyboard Event KeyCode Viewer

Press any key to instantly view KeyboardEvent values like key, code, keyCode, and which. You can also test for hardware double-clicking (chattering), N-Key Rollover (NKRO), and shortcut combinations.

Escape
F1
F2
F3
F4
F5
F6
F7
F8
F9
F10
F11
F12
`
1
2
3
4
5
6
7
8
9
0
-
=
Back
Tab
Q
W
E
R
T
Y
U
I
O
P
[
]
\
CapsLock
A
S
D
F
G
H
J
K
L
;
'
Enter
Shift
Z
X
C
V
B
N
M
,
.
/
Shift
Ctrl
Meta
Alt
Space
Alt
Meta
Menu
Ctrl
Num
Num/
Num*
Num-
Num7
Num8
Num9
Num+
Num4
Num5
Num6
Num1
Num2
Num3
NumEnter
Num0
Num.

Options

event.key-
event.code-
event.keyCode-
event.which-
event.location-
event.repeat-
event.ctrlKey-
event.shiftKey-
event.altKey-
event.metaKey-
event.type-

Shortcut Combo: -

Current Key

-

key: -

code: -

Recent Inputs

  1. No key events yet.

keyCode/which are legacy properties. For new code, check key and code together.

Mobile virtual keyboards may limit keyboard event data. For best results, use an external keyboard or focus the input field.

Usage Tips

Check whether your keyboard input is detected correctly

When you press a key, checking what the browser actually receives can help you quickly test keyboard issues or input errors. If a key is not working or a shortcut behaves differently than expected, compare the pressed key and modifier key status together.

#KeyCode #KeyboardEvent #JavaScript #WebDev #ShortcutTester

What is Keyboard Event KeyCode Viewer?

The Keyboard Tester & Key Recognition Viewer is a real-time online diagnostic utility to check if your keyboard is functioning properly without missing keys. You can instantly detect hardware failures such as unresponsiveness, key chatter (double-typing), and examine multi-key rollover (N-Key Rollover) capacities for smooth typing and gaming.

How to Use

  1. 1Open the Keyboard Tester screen and press the keys you want to inspect one by one.
  2. 2Confirm if the pressed key instantly lights up on screen, validating that the signal is transmitted successfully.
  3. 3Press multiple keys simultaneously to test if your keyboard supports N-Key Rollover (NKRO) without input dropouts.
  4. 4Enable the 'Prevent Default' option in settings to suppress browser hotkeys (such as F5 refresh or Tab navigation) to test these keys safely.
  5. 5Review the action history logs to diagnose key chattering issues (unintentional double-strikes) on mechanical switches.

Treat key, code, and keyCode as different identifiers

Last reviewed: July 11, 2026

Keyboard event fields

key event = key(display value) + code(physical position) + keyCode/which(legacy number)

A single KeyboardEvent exposes the character value, the physical key location, and an older numeric compatibility value.

Pressing the letter a key

  • • event.key = a
  • • event.code = KeyA
  • • event.keyCode = 65
  1. 1. Record the displayed character as a
  2. 2. Record the physical identifier as KeyA and the legacy number as 65

A typical Latin a press appears as key=a, code=KeyA, and keyCode=65 in the event record.

How to read the result

  • key can change with Shift or Caps Lock, while code describes the physical key position.
  • Use code for game controls or hardware checks and key when the actual typed character matters.

Conditions that change the result

  • Fn and media keys may be consumed by keyboard firmware or the operating system before the browser sees them.
  • keyCode and which are legacy values, so new code should prefer key and code together.

Common input mistakes

  • Confusing uppercase A with code=KeyA hides the separate effect of the Shift modifier.
  • Testing Space or F5 without Prevent Default can scroll or reload the page before the event is observed.

Reference Knowledge

  • Key Chatter and Unresponsiveness: Key chatter occurs when a single physical key press registers multiple inputs due to degraded switch contacts. Unresponsiveness is a failure where a key press fails to transmit a signal unless hit with excessive force.
  • N-Key Rollover (NKRO) vs. Ghosting: Office keyboards often limit simultaneous inputs to 2–6 keys. Attempting more can cause 'Ghosting,' where extra inputs fail to register or register incorrectly. High-end gaming keyboards feature full N-Key Rollover to detect all pressed keys concurrently.
  • Suppressing Native Browser Shortcuts: Standard keys like Space, F5, and Tab trigger default browser scrolling, reloading, or focusing. This tool supports event prevention (preventDefault) so you can test these keys without disrupting your viewport.
  • Mobile and Hardware Testing Constraints: Virtual touch-screen keyboards use Input Method Editors (IMEs) with text predictive algorithms, which send synthesized inputs. True mechanical and hardware diagnosis should be conducted with a physical keyboard connected via USB or Bluetooth.

FAQ

Q.I pressed a key once, but it registers multiple times on screen. Is it broken?

A.

Yes, this is known as 'Key Chattering.' It is a common symptom of mechanical switch degradation or dust build-up inside the contact points. You can diagnose this by reviewing the millisecond intervals of keydown events in the history logs to see if duplicate inputs were triggered in rapid succession.

Q.When I press multiple keys at once, some of them are not recognized. Why?

A.

This depends on your keyboard's hardware limits. Many standard office keyboards limit concurrent inputs (2 to 6 keys) or suffer from 'Ghosting.' If you play games requiring complex simultaneous inputs, we recommend using a keyboard that explicitly supports N-Key Rollover (NKRO).

Q.Pressing F5 reloads the page, and Space bar scrolls the page down. How do I test them?

A.

These are standard web browser shortcuts. To bypass this, check the 'Prevent Default' option in the settings panel. This invokes event.preventDefault(), allowing you to isolate and test the key inputs without triggering native browser actions.

Q.Do membrane and mechanical keyboards differ in multi-key rollover performance?

A.

Yes. Membrane keyboards share electrical pathways across a single sheet, leading to signal overlap and input limits (typically 3–6 keys). Mechanical and electrostatic capacitive keyboards feature individual diodes for each switch, enabling true N-Key Rollover (NKRO) for 100% simultaneous input recognition.

Q.Why is my Fn key or volume control buttons not showing up in the tester?

A.

The Fn (Function) key is resolved internally by your keyboard's firmware or laptop BIOS before any signal reaches the OS. Specialized media controls (like volume or screen brightness) are often intercepted by the operating system directly, preventing the web browser from capturing the event.

Q.Can I run this keyboard test on my smartphone or tablet?

A.

Yes. Connect a wired keyboard using an OTG adapter, or pair a Bluetooth keyboard to test physical hardware keys on mobile devices. Note that virtual touch keyboards (soft keyboards) utilize predictive IME layers that do not dispatch raw physical key events, so physical hardware connection is necessary for accurate diagnostics.

UtilityBox Keyboard Event KeyCode Viewer