Skip to content

Ghosting, N-Key Rollover, Chatter and Double Presses

Published: · 5 min reading time · Updated:

The USB HID boot protocol carries 6 regular keys plus the modifier byte in a single report, which means a keyboard can be working exactly as designed and still refuse a seventh key. Four different problems get called ghosting in casual use, and they have four different causes, four different symptoms and four different answers.

Ghosting, in the original sense

A keyboard is a grid of rows and columns, and the controller works out which keys are down by scanning it. Without an isolating diode at each intersection, certain three key combinations complete a circuit through a fourth intersection that nobody pressed, and the controller reports a key that was never touched. That phantom character is what ghosting originally meant.

It is now rare, because the cure is cheap. Manufacturers who did not want to fit diodes chose the other option instead.

Blocking, which is what people actually see

The cheaper cure is to refuse ambiguous combinations rather than guess them. When the controller detects a pattern that could produce a phantom, it drops the third key instead of inventing a fourth. Nothing wrong appears on screen, and one of the keys you are holding simply does nothing.

In games this is the familiar complaint: hold two movement keys, add a third action, and the third one is ignored. In typing it almost never appears, because ordinary text rarely holds more than a letter and a modifier at the same time. That difference in exposure is why gamers discover the limit of a board and touch typists usually do not.

N-key rollover, and the six key limit

N-key rollover means every key has its own path to the controller, so any number of them can be held together and all of them register. It is a property of the matrix and its diodes.

Reporting is a separate question. The boot protocol allows six, so a keyboard using it tops out at six regular keys plus Shift, Ctrl, Alt and the operating system key, which continue to work because they travel in their own byte. Boards that advertise full rollover over USB use a different report format to get around that ceiling, and some offer a switch between the two for compatibility with firmware that only understands the simple one.

Six keys plus modifiers is more than typing ever needs. Anyone counting keys because a game feels unresponsive is looking at the right limit; anyone counting them because of a missed character in a document is looking at the wrong one.

The limit is a property of the connection rather than of keyboards in general. The older PS/2 interface sent each change of state as it happened instead of packing a fixed number of keys into a report, so full rollover came free, which is why adapters and legacy boards sometimes behave better in this one respect than modern hardware does.

Chatter and double presses

Chatter is a single press that registers more than once. Mechanical contacts bounce as they close, firmware waits a few milliseconds to ignore that bounce, and a switch whose contacts have worn or picked up contamination bounces for longer than the wait allows. The result is hhello from one deliberate press.

Auto repeat looks similar and is not a fault. Hold any key and the operating system repeats it on purpose, and a browser marks those events with the repeat flag set, which is exactly how a test tells the two apart. A genuine double from a single tap arrives without that flag.

Contamination is the common cause, so the first thing to try is not a replacement switch. Cleaning the board settles a fair number of chattering keys, and it costs nothing.

Checking each one in a browser

The keyboard test covers all four, and each needs a different action.

1. For blocking, hold three or four keys together and watch which ones light up. Repeat with different combinations, since the pattern depends on the matrix. 2. For the reporting ceiling, hold keys one at a time until a new one stops appearing, then count. 3. For chatter, tap a suspect key slowly twenty or thirty times and watch for a press you did not make. 4. For a dead intersection, press every key once and look for the one that never lights.

One caution about interpreting results. A key that produces nothing on its first press may be behaving correctly, because dead keys are designed to wait for a second press before printing anything. Faults live in the difference between what you pressed and what the board reported, not in what the screen shows.

None of this needs a stressful test to confirm. Once the board is behaving, Alfred Tennyson's The Brook, published in 1855, is a calm way to use it: 482 characters in which short verbs repeat in pairs, so a doubled letter or a missing one shows itself. William Blake's Laughing Song, from the Songs of Innocence he issued in 1789, repeats the same line pattern across 350 characters, which is the same check in fewer keystrokes. And Walt Whitman's There was a child went forth every day, printed in the first Leaves of Grass in 1855, is 225 characters, short enough to copy twice and notice whether every letter arrived exactly once. All three are waiting in the typing test, each with its author, year and source on its own page.

Pick a text

Every passage is in the public domain. Author, year and source stand on its page.

The Brook, I chatter as I flow

Alfred Tennyson · 1855

Tennyson published The Brook in 1855, in the volume Maud and Other Poems. The song of the brook sits inside a longer poem, and it is the song that schools have printed ever since. Tennyson was Poet Laureate from 1850 onwards and the best selling poet of his century. This text comes from an anthology page on Wikisource.

Type this text

Laughing Song, when the green woods laugh

William Blake · 1789

Laughing Song belongs to Songs of Innocence, published in 1789. Blake set his poems in hand lettered plates surrounded by his own drawings, so words and images were made in one operation. Mary, Susan and Emily, named in the last stanza, appear nowhere else in the collection. Project Gutenberg carries the full set.

Type this text

There was a child went forth every day

Walt Whitman · 1855

This poem stood, without a title, in the first edition of Leaves of Grass in 1855. Whitman paid for that edition himself and set some of the type in a Brooklyn printing shop. It held only twelve poems, against several hundred in the last edition he oversaw. The full text is on Project Gutenberg.

Type this text

More from the blog

How to Clean a Keyboard Without Damaging It

Compressed air, keycap removal, isopropyl alcohol at 70 to 99 percent and spill recovery, in the order that keeps the board alive.

Read the article

What an Online Switch Tester Can and Cannot Measure

Registration, repeats and event timing are measurable in a browser. Actuation force, travel distance and sound are not, whatever a page claims.

Read the article

Dvorak and Colemak Compared With QWERTY

Colemak changes 17 keys from QWERTY, Dvorak rearranges nearly all. Home row contents, relearning cost, and when neither layout is worth it.

Read the article

How to Change and Check the Keyboard Layout in Windows

Two shortcuts change the layout in Windows, and one fires by accident. How to add, remove and confirm a layout before blaming the hardware.

Read the article

Tools

Keyboard test

Press a key and watch it light up. It shows keys that stay silent, keys that fire twice, and how many keys your board reads at once.

Check your keyboard

Typing test

A hundred short texts, from Aesop to the US Constitution. You get speed, accuracy and a map of the keys you keep missing.

Measure your speed