Updated

Keyboard test

Press each key and watch it light up on the board.

Press Start testing, then any key. Tab is captured too; Escape or Stop ends the test.

Keys tested
0 / 104
Most keys held at once
0
Last event

Keys tested counts each key pressed and released while testing was on. Most keys held at once is the largest number the page saw down together, the rollover you reached. Last event shows the latest key’s value, physical key code and location.

Test spec

Layout
ANSI, 104 keys
Key states
Untested, held down, tested after release
Rollover
Most keys held at once

Testing a new or used keyboard

Press Start testing, then press each key once, row by row. A key turns yellow while it is down and light with a yellow edge after you let go. A key that stays dark never reached the page.

A held key soon starts repeating on its own, and the browser marks those repeats (MDN, repeat), so holding counts once. Keys already down when testing starts do not count, including the Enter or Space that pressed Start testing.

On a used keyboard, watch for a key that stays yellow after release, which means the page never heard it come back up. Test the left and right Shift, Ctrl and Alt keys, since the board shows each side.

Rollover and ghosting

Rollover is how many keys a keyboard can report at once. The USB keyboard standard defines a boot report, readable before the operating system loads, with one byte for modifier keys and room for six other keys. With more than six of those down, the keyboard must send an error code instead (USB-IF, HID 1.11). Keyboards can define longer reports, so six limits that format only.

In a scanned key matrix, keys sit in a grid of rows and columns that a controller reads. With several keys down at once, the controller can see a key nobody pressed. This is ghosting, and a diode after each switch prevents it (QMK firmware docs).

To check, hold keys and add one at a time while watching Most keys held at once. A key that does not light up was blocked or dropped, and one that lights up unpressed is a ghost. Our guide to keyboard ghosting and rollover goes deeper.

Keys a browser cannot see

The Fn key is usually handled inside the keyboard and sends no code of its own (W3C, UI Events code values). On a Mac, MDN’s table shows Fn firing no key event in Firefox or Chromium (MDN, code values).

The operating system keeps some shortcuts. A W3C community draft names Alt+Tab and Cmd+Tab as presses a browser does not normally get, and Ctrl+Alt+Del on Windows as one no app can override (W3C, Keyboard Lock). If a shortcut takes you to another window, keys you were holding count as tested.

Media keys have no standard place on a keyboard. A browser or the operating system may take one for playback controls (MDN, Media Session API), and then it never reaches the page. One that arrives joins the extra row.

ANSI, ISO and JIS layouts

The board here is the US layout with 104 keys, which Apple calls ANSI. Apple tells its layouts apart by the shape of the Return key and lists ANSI for US English and Korean, ISO for British, German and French, and a separate Japanese layout (Apple).

In the W3C key list, the 102-key layout common in Europe adds IntlBackslash between the left Shift and Z. The Japanese layout adds IntlYen between = and Backspace and IntlRo between / and the right Shift. Lang1 and Lang2 are the Korean Han/Yeong and Hanja keys. These keys appear in an extra row under the board when pressed.

Codes follow a key’s position. The Z key on a German keyboard sits where the US layout has Y, so it lights up as Y.

Laptop and external keyboards

On a keyboard without a number pad, the number pad keys stay dark and Keys tested stops short of the full count.

Laptops often put media functions on the function key row, with Fn needed for the plain function key. The W3C list says such a key should still report the function key’s code (W3C, UI Events code values), so it should light up as that key here. If it lands in the extra row instead, the laptop sent a media code. Try an external keyboard on a second computer too: if the same key fails there, the keyboard is at fault.

When a key does not register

Dell’s guide suggests turning the computer off, cleaning around the key with compressed air, then testing again. For a wireless keyboard it suggests fresh batteries and moving the receiver to a USB port that is not next to an occupied one (Dell).

On a mechanical keyboard with hot-swap sockets, a failed switch can be pulled and a new one pressed in without soldering. A soldered board needs the old switch desoldered first (KeebsForAll, a keyboard retailer).

FAQ

What is the extra row under the board?

It holds keys that are not on the US board, such as IntlBackslash, IntlYen, IntlRo, Lang1 and Lang2, plus any other key code the page receives. Each appears on its first press and adds one to the total. Reset empties the row.

Why does a key show in Last event but not on the board?

It arrived with no key code, so the page has nowhere to place it. The last number in Last event is the location: 0 for most keys, 1 for left, 2 for right and 3 for the number pad (MDN, location).

What do Stop, Escape and Reset do?

Stop and Escape end testing and move focus back to Start testing, so Tab works as usual. Lit keys and counts stay, and Escape counts as tested. Reset clears every key, both counts and the extra row.

Does the tester measure input lag?

No. It does not time key presses, and it saves nothing.

Try another test

With the keyboard checked, try a timed test. The CPS test counts clicks over 5 s, and the reaction time test times your response to a signal.