Something is wrong
What key am I pressing?
If a key types the wrong character, there are only three places the fault can be: the printing on the cap, the layout the operating system is using, or the switch underneath. This separates them in about a minute, by watching which key the computer lights up when you press the one in front of you.
The run, in order
Press the key in question and watch which one lights up
This is the whole diagnosis in one press, because it shows what the computer receives rather than what the keyboard is labelled. The test marks the key your machine reports. If the cap you pressed is the cap that lights, the hardware is doing its job and anything wrong is happening after it. If a different key lights, the machine is reading your keyboard as a different one — which is a settings problem and not a fault at all.
Compare what lit up with what is printed on the cap
The classic mismatches are national layouts, and they are mismatches of three or four keys rather than the whole board. Z and Y swapped is a German layout being read as US or the reverse; A and Q swapped with M beside L is French; a key printed with a currency symbol that produces something else is the same thing. If only a handful of keys are wrong and they are the ones that differ between layouts, nothing is broken and the fix is in the language settings.
Press every key on that row, not just the one that annoyed you
One wrong key and a row of wrong keys mean different things. A whole row misreading points at the layout or at a membrane fault that spans several switches; a single key misreading on an otherwise correct board is far more likely to be a remap left behind by some utility — gaming software, a keyboard configurator, an accessibility setting. The pattern is the evidence, and one key tells you almost nothing on its own.
If the right key lights but types twice, measure the bounce
A key that produces the correct character twice is a different fault with a different cause: the switch is closing twice on one press, which is mechanical wear rather than anything about layouts. That is worth separating here because it often gets reported as "the key is wrong" when the key is right and the switch is tired.
Accept what the browser cannot see
Some keys never reach a web page at all, and a test that showed nothing for them would be lying. The Fn key and most of what it produces are handled inside the keyboard and never sent on; dedicated media and brightness keys usually behave the same way; and a few combinations are taken by the operating system before any page sees them. If a key lights nothing here but works elsewhere on the machine, that is the expected answer rather than a fault.
What the test is actually showing you
A keyboard does not send letters. It sends the position of the key you pressed, and the operating system decides what that position means — which is why the same board types z on one machine and y on another, with nothing changed in the hardware.
So the question “what key am I pressing” has two answers that are worth telling apart. The key you pressed is a physical thing with a label on it. The key the computer received is a position in a layout. When those two agree, everything downstream is a software matter; when they disagree, you have found the fault without opening anything.
Reading the outcome
The right key lights up. The keyboard, the cable and the driver are all doing their jobs. If characters still come out wrong, the cause is above the keyboard: the layout, an input method, or the application itself.
A different key lights up. The layout does not match the printing. Nothing is broken. Fix it in the language settings, and expect it to be a handful of keys rather than all of them.
Nothing lights up. Either the key never reaches a browser — Fn and most media keys do not — or the switch underneath has failed. The keyboard test tells those apart by whether the key works anywhere else on the machine.
The right key lights up twice. A worn switch bouncing, not a layout problem. That is measurable, and the chatter test measures it.
Why this gets misdiagnosed
Almost everyone starts at the wrong end. A key types the wrong character, so the keyboard is blamed, so a new keyboard is ordered — and the new one does exactly the same thing, because the layout followed the computer rather than the board.
One press at the start of this page prevents that. It is also the reason the first step is a measurement rather than a setting: a settings change made before you know what the machine is receiving is a guess, and a guess that happens to work teaches you nothing about which of the three causes it was.
Common questions
Why does the test light up a different key from the one I pressed?
Because your operating system is interpreting the keyboard with a different layout from the one printed on it. A keyboard sends a position, not a letter — the key two to the right of the left shift, say — and the layout decides which character that position means. Change the layout and the same physical key produces something else. This is why the mismatch is almost always confined to the few keys that national layouts disagree about.
How do I fix a layout mismatch?
In the language or input settings of the operating system, not in the keyboard. On Windows it is under Time and language, Language and region, where each language carries a keyboard layout that can be changed or removed. On macOS it is Keyboard, Input Sources. Remove the layout you do not want rather than only adding the one you do, because the shortcut that switches between them is easy to hit by accident and is how most people end up here in the first place.
The right key lights up, but the wrong character appears in my application.
Then the keyboard, the cable and the operating system are all fine and the application is doing it. Some editors and games remap keys internally, some remember a profile per project, and some input methods for other scripts intercept keys before the application sees them. Test the same key in a plain text field to confirm it behaves everywhere else, then look at that application’s own key bindings.
Nothing lights up at all when I press it.
Three possibilities, in order of likelihood. The key may be one the browser never receives — Fn and most media keys are handled inside the keyboard. The switch may have failed, which is what the keyboard test is for in its own right. Or the key may be physically fine but the contact under it dirty, which is the cheapest to rule out and worth doing before replacing anything.
Can I see the key code rather than just the picture?
The useful distinction is between the code for a physical position and the character it produces, and the test is built around the first of those because it is the one that answers this question. A key always reports the same position regardless of layout; what changes is the character. That is exactly why watching which key lights up tells you whether the problem is the board or the settings.
My laptop keyboard types numbers instead of letters.
That is a number pad overlay, not a layout fault. Compact laptop keyboards hide a numeric keypad under the letters on the right-hand side, and a stuck or accidentally pressed Num Lock turns it on. The giveaway is that only that cluster misbehaves and the characters it produces are digits in the shape of a keypad. Pressing Num Lock, sometimes with Fn, turns it off.