The three values
The tester above shows all three for the last key you pressed, which makes the difference obvious. Press a letter, switch your operating system keyboard layout, and press the same key again: the code stays put and the character changes.
| Value | What it describes | Example pressing the same key |
|---|---|---|
code | The physical key position. Does not change with your language settings. | KeyA |
key | The character produced, after the operating system layout is applied. | a, or q on a French layout |
keyCode | A legacy number kept for compatibility. Deprecated, but still widely used. | 65 |
Why code is the one you usually want
If you are checking hardware, the code is the honest value. It says which physical switch closed, regardless of what language the computer thinks it is in. A key that produces the wrong character but the right code is not broken.
If you are writing software, the same logic applies to anything positional. Game movement bound to the position of W, A, S and D should use the code, so the binding lands in the same physical place on a French AZERTY keyboard. Anything about the character the user meant to type should use the key value instead.
Common codes worth recognising
Left and right modifiers report separately, which is useful when testing: a keyboard where the left Shift works and the right does not will show that clearly.
| Keys | Codes |
|---|---|
| Letters | KeyA to KeyZ |
| Digits along the top | Digit0 to Digit9 |
| Number pad digits | Numpad0 to Numpad9 |
| Function row | F1 to F12 |
| Modifiers | ShiftLeft, ShiftRight, ControlLeft, AltLeft, MetaLeft |
| Arrows | ArrowUp, ArrowDown, ArrowLeft, ArrowRight |
| The ISO key beside left Shift | IntlBackslash |
Keys a browser cannot see
The Fn key on a laptop is handled inside the keyboard controller and almost never reaches the operating system, so no web page can test it. Media keys, brightness keys and similar controls are often handled the same way.
Print Screen is usually captured by the operating system or a screenshot tool first. The Windows and Command keys frequently open a system menu instead of reaching the page. None of these silences mean a fault.
Why keyCode is deprecated but still everywhere
The numeric code predates both of the other values and was never well specified across browsers, which is exactly why it was replaced. It survives because an enormous amount of existing code reads it, and removing it would break those pages.
It is shown here because it is still the value many older tools and forum answers refer to, so having it on screen saves a lookup. For anything new, the physical position and the character are the two values worth using.
Repeat events
Holding a key down produces one initial event and then a stream of repeats generated by the operating system, not by the keyboard. Those repeats are marked as such, which is why the keys-at-once counter in the tester does not climb while you lean on a key.
The distinction matters when reading a chatter result. A repeat is the system doing its job at the interval your system settings specify. Chatter is a second genuine press arriving faster than a human could produce one, and the two are counted differently here for that reason.