Skip to main content

Keyboard ghosting and the SideWinder X4

Learn about keyboard ghosting and the new anti-ghosting technology in the SideWinder X4 gaming keyboard

Microsoft Hardware recently announced the release of the SideWinder X4 keyboard featuring new anti-ghosting technology.  This keyboard allows gamers to press many keys at the same time and have them accurately reported.

SideWinder X4 keyboard packaging

Keyboard ghosting: what’s the problem?

Ghosting is the problem that some keyboard keys don’t work when multiple keys are pressed simultaneously.  The keystrokes that don’t show up on the computer or seem to have disappeared are said to have been “ghosted”.  On most keyboards, even some that are explicitly marketed as “Anti-Ghosting”, this happens with many three-key combinations.  Imagine playing your favorite video game and not being able to, say, run diagonally and fire your weapon at the same time (say, pressing a, w, and g simultaneously).  This is a result of the internal design of most existing keyboards, as will be explained below.

But my keyboard says it is ‘Anti-Ghosting’!

When a keyboard is marketed as “Anti-Ghosting” it may just refer to a particular subset of keys on the keyboard working well together.  This does not necessarily guarantee that members of this set of keys avoid ghosting when combined with other keys on the keyboard.

Another marketing strategy is to state that the keyboard allows “up to” some large number of keypresses.  This would be a true statement about a keyboard even if only a single combination of keys of that size can be pressed simultaneously while many three key combinations remain with ghosting issues.  A user of a keyboard like this might attribute the remaining errors to other sources.  For instance, a user playing a game might think that he or she had not hit the key fast enough for the rules of the game, rather than the key not being reported by the hardware at all.

Unlike partial anti-ghosting solutions which have many combinations of three keys which do not work, Microsoft’s SideWinder X4 features multi-touch technology that allows it to detect and report any combination of 17 or fewer QWERTY keys.  Additionally, it can report seven modifier keys, one hot key, and one macro key, bringing the maximum number of reported keys to 26.  (See the SideWinder X4 Anti-Ghosting F.A.Q. for more information.)

What causes ghosting?

Ghosting is typically the result of one or more of the following three limitations: (1) the hardware can’t read the given key combination; (2) the software on the computer doesn’t support multiple simultaneous keys; or (3) the communication protocol between the hardware and software limits the maximum number of simultaneous keys reported.  The next section discusses in more detail the hardware design of typical keyboards that limits the number of keys that can be read at the same time.

Why wouldn’t keyboard hardware be able to read some keys?

Most keyboards are made of a stack of plastic sheets printed with silver ink in a grid of column and row wires, initially unconnected, underneath the keys.  A keypress can then be detected as a connection made between a particular pair of column and row wires from the pressure of the key above it.

Pressing one key

A keyboard showing one key pressed, with column and row shorted together
Note: The wiring under these keys has been simplified for instructional purposes

Typically, when the keyboard looks to see what key is pressed, it looks at each column wire, one at a time, and sees which row wires are connected, or shorted, to it.  When only one key is pressed, there will be exactly one column wire which when examined will have any row wires shorted, and then, exactly one row wire.  This pattern uniquely identifies which key was pressed; there is only one contact point that could cause these test results.

Pressing two keys (different rows and columns)

A keyboard showing two keys in different rows and columns pressed, each shorting its row and column together

When two keys are pressed simultaneously, again, the keyboard will look at each column wire to see which row wires are connected to it.  When the rows and columns are both different between the two keys, there will be two column wires that each produce one row wire short, and those row wires will not be the same.  This can only happen with one set of keypresses, so the keyboard can report exactly which keys are down.

Pressing two keys (same column)

A keyboard showing two keys pressed in the same column, with two rows shorted together with that column

When the two keystrokes share a column, each can again be determined with certainty.  A test pass for shorts will show only one column wire being connected to any row wires, and that wire will be connected to exactly two rows.  Similarly, when the two keys share a row, the pattern will be that each of two column will show a single row connection, and both will be the same row.  This, too, can only happen for one set of depressed keys for a given pattern of shorts.  In fact, any set of collinear contacts can be uniquely determined.

Collinear simultaneous key patterns are distinct

A keyboard showing several keys pressed on the same row but different columns

Pressing three keys (shared rows and columns)

A keyboard showing three keys pressed, two sharing a row and two sharing a column

However, when three keys are pressed, it is not necessarily true that the keys producing the pattern of shorts can be uniquely determined.  For instance, when the three keys share both a row and a column, there are five different sets of keys that each would produce the same pattern of shorts: the same two columns each connected to the same two rows.  (Notice that in the above example, the connected column on the right is shorted to the upper of the two connected rows by way of all three contacts; in fact, the circuit includes a p of the connected column wire on the left).  The five different sets of keystrokes that produce the same pattern of shorts as illustrated above are illustrated below.

Indistinguishable keystrokes

A block of four keys (in two adjacent rows and two adjacent columns) showing five different
			 keypress combinations of 3 to 4 keys, all of which short the same two rows and two columns and are thus ambiguous

Remember, the typical keyboard just checks if a column is connected to a row.  The number of contacts it must travel through don’t add up, becoming “more connected” as more connections are added.  The keyboard just sees the presence or absence of a connection, making the above patterns indistinguishable.  When this happens, that the pattern is ambiguous, the typical keyboard stops reporting new keystrokes to avoid reporting the wrong keys.  We call these unreported keystrokes “ghosted”.

Not all sets of simultaneous keys larger than two are ambiguous (for instance, the example given earlier of collinear keys).  Usually, keyboards will report as many unambiguous keys as they can.  However, the standard reporting protocol limits the number of simultaneous keys to six QWERTY keys plus the modifiers (such as Shift, Ctrl, and Alt).  Some anti-ghosting keyboards are able to report additional keys beyond this either by using a custom reporting protocol designed with an increased limit or by sending additional reports for combinations of large numbers of keys.  However, both of these solutions pose problems.  The use of a custom protocol may not function properly prior to loading the operating system, such as when the computer is booting or when an operating system is being installed.  A keyboard like this may require switching between protocols to support states when the custom protocol can’t be used.  In contrast, sending multiple reports allows the keyboard to remain usable when the computer is in these states.  However, because, the computer’s keyboard software was not designed to be used in this manner, there is a potential for unexpected behavior by the software receiving the multiple reports instead of a single report when large numbers of simultaneous keys are pressed.

How do keyboard designers improve on this?

SideWinder X4 keyboard

An easy change that keyboard makers utilize is to rearrange the wires such that important key combinations don’t exhibit this problem.  However, all this does is move the problems to other sets of keys, where the user is less likely to notice.

Another possibility is to add extra wires to create more unambiguous cases.  However, this is more expensive as more circuitry is needed to read the extra wires.

At the extreme, keyboards have been made with a diode at every key so that each key can be detected individually.  As we discussed above, when only pressing three keys in certain configurations, a fourth key would appear to also be pressed because a circuit would be completed “travelling backwards” along the normal routes established by each of the three contacts.  Diodes prevent this kind of a circuit from forming because diodes conduct current in only one direction.  However, because this requires printing a circuit board with over a hundred diodes, it is relatively expensive.

In contrast, Microsoft’s advanced anti-ghosting technology leverages multi-touch technology to prevent key ghosting.  In addition, by using standard manufacturing techniques and avoiding diodes and large printed circuit boards, this technology remains inexpensive to produce, making it an interesting alternative to other currently available options.

Interactive keyboard ghosting demonstration

Find out which key combinations work on your keyboard: Keyboard Ghosting Demonstration.

Related