What is key rollover and ghosting?
Last reviewed: · Written and verified by the type-type team (editorial policy)
Direct answer: Key rollover (KRO) is the minimum number of keys your keyboard guarantees it can register simultaneously regardless of which keys you hold down — rated as 2KRO (2-key rollover), 6KRO (6-key rollover plus modifiers), or NKRO (N-key rollover, meaning every key on the board at once). Ghosting is an electrical short across an unisolated row-and-column matrix where holding three corners of a grid rectangle bridges the fourth corner; to prevent phantom characters, controllers without per-key diodes block the third key ( key jamming). You can measure your keyboard's live chord limit right now on our keyboard rollover test.
How a keyboard matrix causes ghosting and why diodes stop it (SVG diagram)
Imagine four keys wired at the intersections of two horizontal row wires (Row 1, Row 2) and two vertical column wires (Col 1, Col 2), corresponding to Q, W, A, S. The microcontroller scans the keyboard by driving Row 1 active and reading which columns receive signal, then driving Row 2 active and reading the columns again:
Look closely at the left diagram: when you hold Q, W, and A at the same time, scanning Row 2 sends current through closed switch A onto Col 1, up Col 1 backward through closed switch Q onto Row 1, and across Row 1 through closed switch W onto Col 2! Because Col 2 now goes high while Row 2 is being scanned, the microcontroller cannot tell whether S is pressed or not. Adding a small 1N4148 signal diode in series with each switch (right diagram) blocks the Col 1 → Row 1 reverse path completely.
Worked byte layout: why standard USB HID stops at 6 keys (+8 modifiers)
Why do many mechanical keyboards that have a diode under every single switch still stop at 6 letter keys on our keyboard rollover test? The answer lies in the 8-byte USB HID Boot Protocol packet defined by the USB Implementers Forum:
| Packet byte | Size | Contents & capacity |
|---|---|---|
| Byte 0 | 8 bits (1 byte) | Modifier bitmask: Bit 0 = L-Ctrl, Bit 1 = L-Shift, Bit 2 = L-Alt, Bit 3 = L-GUI, Bits 4–7 = Right Ctrl/Shift/Alt/GUI (all 8 modifiers can be held at once). |
| Byte 1 | 8 bits (1 byte) | OEM reserved constant byte (0x00). |
| Bytes 2–7 | 48 bits (6 bytes) | Six 1-byte array slots holding up to 6 active non-modifier HID Usage IDs (e.g. 0x04 for KeyA through 0x09 for KeyF). |
Worked example: Because modifiers live in Byte 0 while letters live in Bytes 2–7, holding ShiftLeft + ControlLeft + AltLeft + A + S + D + F + J + K on a 6KRO keyboard reports 3 modifiers + 6 letters = 9 keys simultaneously. To report a 7th letter key at the same time, the keyboard firmware switches to a bitmap NKRO report descriptor where 16 bytes (16 × 8 = 128 bits) allocate one dedicated bit to every key code from 0x00 to 0x7F.
Step-by-step: how to test your keyboard for ghosting and rollover
- Step 1 — Verify individual switches first: Open the keyboard tester and make sure none of the keys you plan to hold are individually dead or sticking.
- Step 2 — Run the 8-finger home-row press on the rollover tester: Open the keyboard rollover test and press
A S D F J K L ;down together. Read themax simultaneouscounter: 2–4 indicates a 2KRO membrane matrix, 6 indicates USB 6KRO mode, and 8+ confirms active NKRO. - Step 3 — Test 2×2 adjacent matrix squares: Hold
W + E + S + DandU + I + J + K. If only two of the four keys appear in the live held list, those rows and columns lack diode isolation; see mechanical vs. membrane keyboards.
Why does a 2KRO keyboard sometimes register five keys in one area of the board and block on just three keys in another? Matrix designers on gaming-oriented membrane keyboards deliberately route separate row and column traces to high-use keys like W, A, S, D, Space, ShiftLeft, ControlLeft so those specific chords do not share a 2×2 matrix rectangle. That selective routing is marketed as “multi-key anti-ghosting,” even though the rest of the letter block still operates as a standard 2KRO membrane grid. Testing both the left-hand WASD cluster and the right-hand I O K L cluster reveals immediately whether your board has true per-key diodes or selective trace routing.
Common mistakes when testing rollover
- Holding OS or browser hotkeys during a chord test: Pressing
Ctrl + W,Ctrl + R, orAlt + F4inside a multi-key chord triggers browser actions before the page can count the keys. Test rollover with plain letter keys first. - Testing over Bluetooth when your keyboard only supports NKRO over USB: Many wireless mechanical boards limit Bluetooth HID packets to 6KRO to save battery and maintain GATT compatibility. Plug in the USB cable or 2.4 GHz dongle to test full NKRO.
- Forgetting to toggle the keyboard's hardware NKRO shortcut: Several QMK/VIA and retail mechanical boards ship in 6KRO boot mode and use a key combination (such as
Fn + NorFn + Right Shift + N) to toggle between 6KRO and NKRO.
Frequently asked questions
What is the exact difference between ghosting and key jamming (masking)?
True ghosting is when pressing three keys on a shared matrix rectangle causes an unpressed fourth key to register by mistake. Key jamming (or masking) is when the keyboard controller detects that 3-key rectangle and deliberately blocks the third key so a phantom fourth letter never appears on screen.
How does a 1N4148 diode on every switch solve matrix ghosting?
A diode acts as a one-way electrical valve. When the controller energizes one row (or column) at a time during matrix scanning, the diode at each closed switch lets current flow into the sense line while blocking reverse current from sneaking backward through other held switches.
Why does standard USB HID Boot Protocol cap rollover at 6 regular keys plus 8 modifiers?
The USB HID 1.1 Boot Keyboard report descriptor specifies a fixed 8-byte packet: Byte 0 holds 8 single-bit flags for Left/Right Ctrl, Shift, Alt, and GUI (Meta); Byte 1 is reserved; and Bytes 2 through 7 hold six 1-byte key usage codes.
How do USB NKRO keyboards bypass the 6-key packet limit?
They expose either a bitmap HID report descriptor — where a 15-to-16-byte bitfield assigns 1 bit to each possible key usage code (120+ keys simultaneously) — or a composite USB device that combines a 6KRO boot interface for BIOS with an extended NKRO interface for the operating system.
Does a 2-key rollover (2KRO) rating mean I can never press 3 keys at once?
No. A 2KRO rating means the minimum guaranteed number of keys across ANY arbitrary combination on the board is 2. Many 3-key, 4-key, or 5-key combinations that lie on separate matrix rows and columns will still work fine on a 2KRO keyboard.