Another thing to note about gaming keyboards is that they often advertise “n-key rollover” (the ability to have n simulataneous keys pressed at once — for many key combinations, typical keyboards will often only let you press two keys at once, excluding modifier keys). Although not generally tested here, I tried a “Razer DeathStalker Expert Gaming Keyboard” that advertises “Anti-ghosting capability for up to 10 simultaneous key presses”. The Razer gaming keyboard did not have this capability in a useful manner and many combinations of three keys didn’t work. Their advertising claim could, I suppose, technically true in that 3 in some cases could be “up to 10”, but like gaming keyboards claiming to have lower latency due to 1000 Hz polling, the claim is highly misleading at best.
That being said, the real issue was keyboards that used matrix encoders, where all keys were represented in a matrix, addressed by one line going high on the X axis and one line going high on the Y axis. I understand that this is cheaper, and expect that it’s probably because this requires running fewer traces from the keys to the controller than doing one for each. It looks Something like:
-
X1
X2
X3
Y1
“Q”
“W”
“E”
Y2
“R”
“T”
“Y”
Y3
“U”
“I”
“O”
That’s just a 3x3 matrix, as an example. So if I press “Q” on my keyboard, the X1 and Y1 line will go high. If I keep it pressed and then additionally press the “W” key, the Y1 line, which is already high, will stay high. The X2 line will then also go high. The controller can detect the keypress, since a new line has gone high.
If I keep both keys pressed and then additionally press the “R” key, then the X1 line is already high due to the “Q” key being down, and will stay high. The “Y2” line will go high. The controller can detect the keypress.
However, if I then press the “T” key, it can’t be detected. Pressing it would normally send the X2 line and Y2 line high, but both are already high due to existing keys being pressed.
In practice, keyboard manufacturers try to lay out their matrix to try to minimize these collisions, but there’s only so much they can do with a matrix encoder. They’ll also normally run independent lines for modifier keys.
A controller using a matrix encoding can always detect at least two keys being simultaneously pressed, but may not be able to detect a third.
Matrix encoders aren’t really an issue when typing, but some games do require you to press more than two non-modifier keys at once. For example, it’s common to use the “WASD” keys for movement, and moving diagonal requires holding two of those. if someone is playing a game that requires pressing another key or two at once, those might collide.
As I recall, USB sends the full state of the keyboard, not events specific to a button when a button is pressed. There are protocol-level restrictions on the number of “pressed keys” that can be pushed. That means that USB keyboards don’t support n-key rollover, and are why you’ll see some companies selling gaming keyboards with a PS/2 option — because that protocol does send state on a per-button basis. (It’s also why, for those of us that have used PS/2 keyboards and have experienced this, it’s possible to get a key on a PS/2 keyboard “stuck” down until it’s pressed again if the OS, for whatever reason, misses a key-up event.) USB gaming keyboards probably (hopefully) won’t actually advertise n-key rollover. But they can avoid using a matrix encoder, and in general, one really doesn’t need n-key rollover for playing games — just the ability to detect up to the USB limit. We only have ten fingers, and I don’t think that there are any games that require even something like six keys to be down at once.
Obviously, in the case the author hit with the Razer keyboard, it wasn’t able to do that. I’m not sure what they’re doing (unless they’re simply completely fabricating their feature claim, which I assume that they wouldn’t). They might be using a larger matrix and sparsely-populating it, though I’m guessing there.
The “default” mode for a USB keyboard allows submitting 6 keys + modifiers. Some boards define nontraditional input descriptors that allow more, but that mode is not guaranteed to work in places like the BIOS menu or naive KVM switches.
To avoid phantom keypresses when you hit three keys in a “square” on the matrix, a diode can be placed in series with each switch so current can’t go through an “indirect” route.
That being said, the real issue was keyboards that used matrix encoders, where all keys were represented in a matrix, addressed by one line going high on the X axis and one line going high on the Y axis. I understand that this is cheaper, and expect that it’s probably because this requires running fewer traces from the keys to the controller than doing one for each. It looks Something like:
That’s just a 3x3 matrix, as an example. So if I press “Q” on my keyboard, the X1 and Y1 line will go high. If I keep it pressed and then additionally press the “W” key, the Y1 line, which is already high, will stay high. The X2 line will then also go high. The controller can detect the keypress, since a new line has gone high.
If I keep both keys pressed and then additionally press the “R” key, then the X1 line is already high due to the “Q” key being down, and will stay high. The “Y2” line will go high. The controller can detect the keypress.
However, if I then press the “T” key, it can’t be detected. Pressing it would normally send the X2 line and Y2 line high, but both are already high due to existing keys being pressed.
In practice, keyboard manufacturers try to lay out their matrix to try to minimize these collisions, but there’s only so much they can do with a matrix encoder. They’ll also normally run independent lines for modifier keys.
A controller using a matrix encoding can always detect at least two keys being simultaneously pressed, but may not be able to detect a third.
Matrix encoders aren’t really an issue when typing, but some games do require you to press more than two non-modifier keys at once. For example, it’s common to use the “WASD” keys for movement, and moving diagonal requires holding two of those. if someone is playing a game that requires pressing another key or two at once, those might collide.
As I recall, USB sends the full state of the keyboard, not events specific to a button when a button is pressed. There are protocol-level restrictions on the number of “pressed keys” that can be pushed. That means that USB keyboards don’t support n-key rollover, and are why you’ll see some companies selling gaming keyboards with a PS/2 option — because that protocol does send state on a per-button basis. (It’s also why, for those of us that have used PS/2 keyboards and have experienced this, it’s possible to get a key on a PS/2 keyboard “stuck” down until it’s pressed again if the OS, for whatever reason, misses a key-up event.) USB gaming keyboards probably (hopefully) won’t actually advertise n-key rollover. But they can avoid using a matrix encoder, and in general, one really doesn’t need n-key rollover for playing games — just the ability to detect up to the USB limit. We only have ten fingers, and I don’t think that there are any games that require even something like six keys to be down at once.
Obviously, in the case the author hit with the Razer keyboard, it wasn’t able to do that. I’m not sure what they’re doing (unless they’re simply completely fabricating their feature claim, which I assume that they wouldn’t). They might be using a larger matrix and sparsely-populating it, though I’m guessing there.
The “default” mode for a USB keyboard allows submitting 6 keys + modifiers. Some boards define nontraditional input descriptors that allow more, but that mode is not guaranteed to work in places like the BIOS menu or naive KVM switches.
To avoid phantom keypresses when you hit three keys in a “square” on the matrix, a diode can be placed in series with each switch so current can’t go through an “indirect” route.