Guide · Input

Key Rollover and Ghosting, Explained

By Device Bench · Published · Reviewed

If a strafe, sprint, and jump combination drops a key, the cause may lie in the keyboard matrix, report format, firmware, transport, operating system, or browser. A browser test shows which inputs arrived; it cannot tell you where a missing one was lost.

Boot protocol6 keys + 8 mod bits Ghost cluster3 corners → 4th Modifiersseparate boot-report bits

Hold a combination and watch the Held and Max rollover counters. Those counts reflect what the browser receives, not a guarantee for every combination. Everything runs in your browser and nothing you press leaves your device.

What rollover actually measures

Rollover is how many keys a keyboard can register and report correctly at once. Under the n-key rollover naming convention, a 2KRO board guarantees any two keys together and a 6KRO board guarantees any six. NKRO means every key on the board can be held at once and still register.

Two limits matter here: the matrix must distinguish the pressed keys, and the report format must be able to send them to the computer. Matrix limits can depend on which keys you hold, so different combinations on the same board may behave differently.

How a keyboard matrix works

Most keyboards wire their switches into a matrix rather than giving each key a dedicated wire to the controller. For a full-size board with over a hundred keys, that saves cost and space. The matrix has row and column lines, with a switch at each intersection. Pressing a key closes the switch, connecting its row and column.

The controller scans the grid by energizing one row at a time and reading the active columns. It repeats the scan many times per second. If row 3 is energized and column 7 reads active, the key at that intersection is down. A single held key is unambiguous; several held keys can create extra current paths through the closed switches.

Why ghosting happens — and why you rarely see a ghost

Imagine three held keys at three corners of a rectangle in a matrix without per-key diodes: two share a row, and one shares a column with the third. During a scan, current can pass through the three closed switches in series and make the fourth corner read as pressed too. The electrical reading cannot distinguish those three keys plus one phantom from four real presses. That phantom fourth press is ghosting.

To avoid reporting the phantom fourth corner, firmware may suppress keys in the ambiguous combination. That can omit a real held key, so you see a missing key rather than an extra one. This is one possible firmware response, not the explanation for every missing event.

In QMK's example, a diode in series with each switch blocks the reverse current path, allowing the matrix to distinguish its intersections independently. Per-key diodes address that electrical ambiguity; report format and firmware behavior remain separate limits between the matrix and the browser.

6KRO, NKRO, and why modifiers don't count

The classic USB boot-keyboard report has six ordinary key slots and separate modifier bits. Modifiers do not use those six slots. A keyboard can use a different report format after the operating system loads. A six-key plateau is consistent with the boot format, but the count alone cannot distinguish that from limits in the matrix, firmware, transport, operating system, or browser handling.

For NKRO, the sensing hardware, firmware, and report path all have to represent the held combinations. Many laptop and compact-board Fn functions are handled in firmware: the physical Fn press may never reach the operating system, even when it triggers a media or function action.

Rollover limits matter most for deliberate chords, such as movement plus modifiers and action keys. Check that the whole combination arrives reliably.

How to test yours

Open the keyboard tester and hold down a combination. Held counts the keys the browser currently sees; Max rollover records the highest count in the session. Start with movement keys plus Shift and Space, a rhythm-game chord, or a shortcut you use. One synthetic spread does not represent the whole board.

If Held stops at six, a six-slot report mode is one possible explanation. Firmware, transport, operating-system, or browser handling can produce the same count. If a particular combination repeatedly loses a key that works on its own, matrix ambiguity or firmware blocking is plausible, not proven. Compare another connection mode or the vendor's diagnostic before assigning a cause.

An unusual ten-key spread may fail even when your usual chords work. Treat those as separate results rather than using the largest count to describe the whole board.

A matrix example you can trace

Three closed corners of a rectangle can make the fourth intersection ambiguous in a matrix without per-key diodes. Firmware may report that phantom fourth corner, producing a ghost, or block the ambiguous combination and omit a real key. The table separates the matrix scan from the resulting events the browser receives.

Closed positionsMatrix evidenceBrowser consequence
R1C1One row-column intersectionOne key event
R1C1 + R1C2Two intersections on one rowTwo events if rollover permits
R1C1 + R1C2 + R2C1Three corners make R2C2 ambiguous without isolationFirmware may suppress a real key or emit a ghost

Sources and standards

QMK explains the matrix scanning, ghosting, and diode behavior used in the example above. USB-IF covers keyboard report formats, while W3C defines the keyboard events available to a web page.

See a mistake or a changed standard? Report a correction.

Related