Ask Slashdot: Low-Latency PS2/USB Gaming Keyboards? 177
An anonymous reader writes "I've a cheap but low latency mouse (A4Tech) and I noticed my trusty old wired Logitech PS/2 keyboard seems at least 50ms slower (if not more) than the mouse when I test with those reaction time sites. I even increased finger travel distance over my mouse button to make it fairer and the difference still remains. So either the tests are slower with keyboards or my keyboard is high latency. Assuming the latter any suggestions for a good reasonably priced gaming keyboard? Extra function keys might be nice but since my hands aren't big what would be better is being able to output a custom key/combo if you hold down (special?) keys while pressing another key. For example I could configure it so if I hold down "Special Key 1" with pinkie or thumb and press 4 it actually outputs 9, and if I hold down shift as well it outputs shift+9 (and not just 9). Being able to replace the capslock key function and have it behave as another key (or a special modifier) would be a bonus — I've never needed capslock and have probably used it more by mistake than for its normal function, or to test how badly a PC has hung."
Re:You're testing wrong (Score:4, Informative)
You're off by a factor of one thousand. What you're quoting says :
Data sent from the device to the host is read on the falling edge of the clock signal; data sent from the host to the device is read on the rising edge. The clock frequency must be in the range 10 - 16.7 kHz. This means clock must be high for 30 - 50 microseconds and low for 30 - 50 microseconds.. If you're designing a keyboard, mouse, or host emulator, you should modify/sample the Data line in the middle of each cell. I.e. 15 - 25 microseconds after the appropriate clock transition. Again, the keyboard/mouse always generates the clock signal, but the host always has ultimate control over communication.
Re:50 ms? (Score:5, Informative)
USB latency is nowhere near 50-100ms, more like 1ms for a low-speed/full-speed device (which most HID devices are). a high speed device could be polled at 8*125us.
You'd probably need the lousiest USB controllers and a horrible CPU to get anywhere near what you're describing.
Disclaimer: I've actually worked on USB Host Controller and Device Controller drivers in embedded environments
Re:Cherry MX Brown (Score:5, Informative)
Brown is not what you want. They are similar to the "blue" keys but with less noise - I actually own both. There is still a significant distance the key must travel (up then down) to register sequential keystrokes. What you really want are the "red" keys. These keys require only a minimal amount of travel and do not have a noticeable "click" when activated. A pain for typists but it allows gamers to press keys at a very high frequency. The "black" keys are similar but require ~50% more force so they're a bit slower.
But all mechanical keyboards are great at minimizing latency - it is because of the differences between switches and capacitors. The chiclet keyboards work my altering observed capacitance - this requires a controller to continuously scan for key changes and then send the appropriate signals to the host. This takes time and results in the latency the original poster was talking about. Mechanical keyboards are simple switches and are faster to scan. I imagine some mechanical keyboards are even interrupt driven resulting in latency measured in microseconds -- but changes in capacitance can't trigger interrupts.
Re:You're testing wrong (Score:5, Informative)
Polling the USB stack has almost nothing to do keyboard response time.
Keyboard response time depends mostly on how often the built-in microcontroller scans the keyboard matrix. A common interval is 40 ms. Polling the USB stack does nothing to get the microcontroller to scan the keyboard matrix more frequently. If the writer of the firmware decides 40 ms between scans is frequent enough, then you're stuck with 39+ ms latency in the worst case.
Re:so this...... (Score:4, Informative)
Re:You're testing wrong (Score:3, Informative)
The paper that comes to my mind when I read your post is:
Soon, C. S.; Brass, M.; Heinze, H.-J. & Haynes, J.-D. (2008). Unconscious determinants of free decisions in the human brain. Nature Neuroscience, 11, 5, 543-545, doi:10.1038/nn.2112 [doi.org] (article paywalled but a quick google provides an alternative link to the article PDF [socialbehavior.uzh.ch]).
I've a small collection of references for scientific "mind reading" studies I've gathered over the years, so if it's not the one you're thinking of, give me some more details and I might be able to dig it up for you.
Re:so this...... (Score:4, Informative)
A typical round of 5 games of equal skill could go:
Player A,B
0.25, 0.35
0.21, 0.37
0.39, 0.3
0.3, 0.34
0.31, 0.29 Final score: Player 1: 2 points, Player 2: 3 points
That was obviously contrived, and I made up the scores. So let's try the best of 10,000 games with a random number generator:
Player A: 4926
Player B: 5074
On first run, not quite 5000 each, but that's well within expected occurrence. Now let's try with a 50 millisecond penalty for player B:
Player A: 7163
Player B: 2837
Wow! Player A is winning almost 3/4s of the games despite only 0.05 secs being added! Such a small amount makes a far bigger difference than you would think.
For fun, let's try a 10ms penalty for player B:
Player A: 5453
Player B: 4547
Even a measly 10ms makes a significant difference in the long run.