If you look at the "gaming" keyboards, many of them are priced at $ 100 or higher on claims of speed. In advertisements can be found such statements:
- Specially designed keys that shorten the press registration time.
- 8 TIMES FASTER - polling speed 1000 Hz: response time 0.1 millisecond
- Get an absolute edge over your opponents with the ultra-fast 45g key switches and 40% faster response than the standard Cherry MX Red switches
- The highest polling rate in the world is 1000 Hz
- The fastest gaming keyboard in the world, polling frequency 1000 Hz, response time 0.001 seconds
Despite all these statements, I found only
one person who publicly tested the keyboard response time — and he checked only two keyboards. In general, in my opinion, if someone makes a performance statement without benchmarks, then these statements are probably not true, as untested (or otherwise verified) software code should be considered as non-working by default.
The situation with gaming keyboards is a lot like a conversation with a car dealer:
')
Seller : This car is super safe! She has twelve airbags!
Me : That's good, but what does she look like in crash tests?
Seller : Twelve airbags!Of course, gaming keyboards have a polling frequency of 1000 Hz, and so what?
There are two obvious questions:
- How important is the keyboard response?
- Are gaming keyboards really faster than ordinary?
How important is the keyboard response?
If you asked a year ago if I was going to build a special installation for measuring the response of keyboards, I would say that this is stupid - and now I am sitting with a logic analyzer and measuring the response of keyboards.
It all started because
I had the feeling that old computers seemed to respond faster to keystrokes than modern machines . For example, the iMac G4 for macOS 9 or Apple 2 seems faster than my 4.2 GHz Kaby Lake system. I never trusted such sensations, because decades of research have shown that users often experience sensations directly opposite to reality, so I took a high-speed camera — and began to measure the real delay between pressing a key and the appearance of a symbol on the screen, as well as a speed delay. cursor response to the movement of the mouse. As it turned out, the seemingly fast old computers really turned out to be fast, much faster than my modern computer - for computers of the 70s and 80s, the delay between pressing a key and the appearance of a character on the screen is often between 30 and 50 ms without any modifications while in modern computers it is often in the range from 100 to 200 ms when a button is pressed in the console. You can reduce the response to 50 ms in well-optimized games with an elaborate game configuration, and there is one extraordinary consumer device that easily beats the result 5 μs, but most others work much slower. Modern computers have greatly increased
throughput, but the response time does not look so good.
In any case, during measurements, my Kaby Lake at 4.2 GHz had the highest single-threaded performance among all the computers that can be bought, but the response time is worse than that of the fast machine of the 70s (about 6 times slower than Apple 2), which is a bit strange. To find out where the delay occurs, I began to measure the response time of the keyboard, because this is the first part of the I / O pipeline. I planned to estimate delays from the beginning to the end, starting from the first link and excluding the keyboard as a real source of the delay. But it turned out that the keyboards have a very significant delay! I was very surprised that the median latency of the tested keyboards exceeds the response time of the entire Apple 2 pipeline. If you don’t immediately understand the depth of this absurdity, please note that the Apple 2 processor has only 3500 transistors at 1 MHz; modern top keyboards about
80 thousand transistors at 16 MHz. These are 20 times more transistors, which operate at 16-fold clock frequency - the keyboards today are more powerful than the computers of the 70s and 80s themselves! Still, the average median keyboard today adds the same delay as the entire I / O pipeline, right down to the display, on a fast 70s machine.
Let's look at the response characteristics of some keyboards:
The response time is the time from the beginning of the movement of the pressed key to the arrival of the
corresponding USB packet on the USB bus . Numbers are rounded to 5 ms to avoid a false sense of accuracy. The Easterntimes i500 model is also sold under the name Tomoko MMC023.
The “Interface” column indicates the type of connection: USB FS corresponds to the USB Full-Speed ​​protocol, which supports polling up to 1000 Hz — this feature is often advertised in top keyboards. USB conforms to the USB Low-Speed ​​protocol, which is used in most keyboards. The “Gaming” column indicates whether this model is positioned as a gaming keyboard. “Wireless” means having a specific receiver, and “unified” is the Logitech wireless standard.
As you can see, even on such a limited set of keyboards, the difference in response time is 45 ms. Thus, a modern computer with one of the slowest keyboards cannot respond as quickly to keystrokes as a fast machine of the 70s and 80s, because the keyboard alone is slower than the entire I / O pipeline on those old computers.
So we established the fact that modern keyboards are a significant factor in the increase in latency that has occurred over the past 40 years. Another question - is the delay of the modern keyboard meaningful to users? From the table we see the difference in the delay of about 40 ms. Is there such a difference? Let's compare the keyboard response time and study some empirical research on human perception.
There is a significant amount of research that suggests that in very simple tasks,
people are able to perceive a delay of 2 ms or less . Moreover, the increase in latency is not only noticeable to users, but also
causes less precise execution of simple tasks . If you want a visual demonstration of what the delay looks like, and you don’t have an old computer at hand,
here’s the MSR demo on touchscreen delay .
Are gaming keyboards really faster than ordinary?
I really would like to test more keyboards before making bold statements, but it comes out of preliminary tests that gaming keyboards are no faster than regular keyboards.
For gaming keyboards, features are often advertised that reduce response time, such as connecting via USB FS and polling 1000 Hz. The USB Low-Speed ​​specifications set the minimum time between batches to 10 ms, i.e. 100 Hz. However, USB devices often round this value to the nearest power of two and operate for 8 ms, that is 125 Hz. With an interval of 8 ms between packets, the average delay due to the need to expect the next round of polling is 4 ms. With a 1 ms polling interval, the average delay from the USB polling is 0.5 ms, which gives us a difference of 3.5 ms. Although this may be a noticeable increase in latency for fast keyboards like Apple Magic, but it is clear that the response time of the keyboard is more dependent on other factors, and the gaming keyboards from our test are so slow that the saving of 3.5 ms does not save them.
Conclusion
Most keyboards add a delay that is noticeable enough to degrade the user's experience with the computer, and advertised as “fast” keyboards are not necessarily faster than others. The two gaming keyboards we tested were not faster than the others, and the fastest keyboard in the test is Apple's minimalist keyboard, which is advertised more as a sample of design, not speed.
Earlier, we saw that
consoles add significant latency up to 100 ms in relatively pessimistic conditions if you choose the “correct” terminal . The
following article shows the response time of the entire pipeline from start to finish — it tells you what other sources of delay are contributing and how some modern devices speed up the overall response time.
Application: where does the delay come from
The main source of the delay is the key travel time. It is no coincidence that the fastest keyboards in the test have much less key travel. Measurements were made on a 240 FPS camera, with an interval of 4 ms between frames. When shooting "normal" keystrokes and printing, the complete release takes 4-8 frames. Most switches work before the key returns to its original position, but still the key travel does matter and can easily add 10 additional milliseconds of delay (or more, depending on the switch mechanism). Compare this with the Apple Magic keyboard, where the key travel is so small that it does not register with a 240 FPS camera at all, that is, it takes less than 4 ms.
Please note that unlike other measurements that I managed to find on the Internet, here is measured the time from the beginning of the keystroke, and not from the activation of the switch. Because as a person you do not activate a switch, you press a key. If you start the measurement with the activation of the switch, then most of the delay is lost. For example, if you play a game and switch between moving forward and backward, then to change the movement on the screen, you need to spend time pressing a key, which is different on different keyboards. Here it is often objected that “real” gamers hold the keys in a half-pressed state and do not spend so much time on pressing. But if you take a high-speed camera and remove how people actually work on the keyboard, you will see that practically no one uses this technique even among gamers. Perhaps professional top gamers will use it, but even in this case, using the standard WASD or ESDF layout, the “forward” and “back” keys will usually not be in a half-pressed state. Also the idea that a significant delay on the useless key travel is normal is absurd, because you can keep the key in a half-pressed state. It’s like saying that a great response time on modern computers is normal, because you can build a game configuration that shows 50 ms response time in extremely optimized programs. Ordinary, not hardcore gamers just do not bother with this. Since they constitute an absolute majority, the behavior of "serious" gamers can be taken for a statistical error.
Another important source of delay is the scanning of
the keyboard matrix and the delay in eliminating false repeated presses. None of these delays is mandatory — the matrix is ​​set instead of connecting each key separately, because it saves a couple of dollars, and most keyboards scan the matrix so slowly that the delay becomes noticeable to the user, in order to save a couple more dollars. But manufacturers are willing to slightly increase the cost in order to reduce the delay to a level far below the threshold of human perception. See below for the delayed press.
Although we did not discuss performance issues here, when measuring my typing speed, I noticed that it is higher on
the Apple keyboard with a lower key stroke than on any other. It is impossible to conduct a blind experiment here, but Gary Bernhardt and others confirm these conclusions. Some say that the keystroke does not affect the speed of typing, because they use the lowest possible move, so it doesn’t matter. But as in the case of pre-pressed keys, if you walk around and shoot with a high-speed camera, as in reality people type the text, it’s hard to find someone who does this in reality.
Appendix: Counter-Arguments Against Delay Matters
Before writing this article, I read all the materials about the response time that I could find - and it was difficult to find an article where at least one of the arguments listed below was missing:
Computers and devices are fast
The main counter-argument against measuring response time is that the input delay is almost zero, so it can be ignored. For example, two top comments on
this post on Slashdot . One of them even says:
No modern keyboard has a 50 ms delay. That you (people) have such a delay.
As for the response time, you only need to increase the polling speed in the USB stack.
As we have seen, some devices still fit during a 50 ms response time. This quotation, like the other comments in that thread, illustrates another common misconception - that the response time of input devices is limited by the USB polling speed. Although technically it is possible, but now most devices are not even close to such a speed that the limitation is the USB polling delay.
Unfortunately, most explanations of input latency
suggest that the USB bus is the limiting factor .
People do not distinguish a delay of 100 or 200 ms
Here is a "cognitive neuroscientist who studies visual perception and cognitive abilities .
" He refers to the fact that a person’s reaction rate is 200 ms, and says a bunch of scientific nonsense to prove that no one is able to notice a delay of less than 100 ms. It is a bit unusual here that the commentator claims special authority and abundantly uses scientific terminology, but in general people often say that a delay of 50 or 100 ms cannot be noticed, because the human response speed is 200 ms. Such an argument does not make sense, because these are independent values. It’s like saying that you didn’t notice that the plane was late by an hour, because the flight time is six hours.
Another problem with this kind of reasoning is as follows. If you accept it, then nothing prevents you from adding 10 ms of delay at each stage of the I / O pipeline - as a result, the total time will swell greatly and we will get a situation like now when you buy a computer with the fastest processor on the market, and the response time is it is six times worse than the car 70s.
It does not matter, because the game is updated at 60 FPS
Fundamentally, this is the same delusion as the previous one. If you have a half-cycle delay, then with a probability of 50%, it will transfer the event to the next processing step. This is better than 100% probability, but I don’t understand why people think that the delay should be as great as the screen refresh rate for it to matter. And for reference, a 45 ms delta between the slowest and fastest keyboards we measured corresponds to 2.7 frames per 60 FPS.
Keyboards can not be faster than 5/10/20 ms due to the elimination of false repeated presses
Even without the effort of optimizing the switch mechanism, if you need to add a delay to the system, there is no reason why the keyboard cannot count pressing (or releasing) a key at the moment of contact. This is commonly done in other types of systems and, as far as I can tell, nobody hinders the keyboards in doing the same (and I hope some of them do this). Time to eliminate false repeated clicks may limit the speed of re-entering a character, but there is no obligatory reason why it should affect the response time. And if we take the speed of re-entering a character, then we will present the 5 ms limit on the time the key changes state due to the introduction of a delay. This means that a full cycle (press and release) takes 10 ms, that is, 100 keystrokes per second, which far exceeds the capabilities of any person. You may argue that this is a certain inaccuracy that can adversely affect some applications (music, games with rhythm), but it is limited to the switch mechanism. Using the mechanism of eliminating false repeated clicks with a delay does not make the situation worse than it was before.
An additional problem with the delay in eliminating false repeated presses is that most keyboard manufacturers seem to confuse the polling rate and the delay in eliminating false repeated presses. Often you can find a keyboard with a polling frequency from 100 to 200 Hz. This is justified by statements like “There is no reason to increase the speed of the survey, because the delay in eliminating false repeated presses is 5 ms” - here both misconceptions described above are combined. If you pull out the circuit from the keyboard of Apple 2e, you will see that there the polling frequency is about 50 kHz. The delay for the elimination of false repeated presses is approximately 6 ms, which corresponds to a frequency of 167 Hz. Why interrogate the keyboard so often? Thanks to a quick scan, the keyboard controller immediately starts the delay time to eliminate false repeated presses (maximum 20 microseconds), unlike modern keyboards, which are polled at 167 Hz. Because of this, the countdown time for re-triggering can begin after 6 ms, that is, the pause takes 300 times longer.
I apologize for the lack of clarification on terminology, but I think that everyone who gives such an argument should also understand :-).
Appendix: experimental setup
USB measurements were performed on a
USB cable . Opening the cable disrupts the integrity of the signal, and I found that with a long cable, some keypads with a weak signal do not provide enough level to register with my cheap logic analyzer.
The beginning of the measurement was initiated by simultaneously pressing two keys - one on the keyboard, and the second connected to the logic analyzer. Here a certain error appears, because it is impossible to press two keys absolutely simultaneously. To calibrate the installation, we used two identical keys connected to the logic analyzer. The median average error was less than 1 ms, and 90% of errors fall within 5 ms. For really fast keyboards, errors of this size make it impossible to measure at this setting, but in our case, measurements of the average delay can be considered acceptable. Probably, the error at the same time pressing the buttons can be reduced by a negligible amount, if you construct a device that will simultaneously press a button and turn on the logic analyzer. With such a setup, the accuracy of measuring averages will also improve (because it will be easier to carry out a large number of tests).
If you want to know the exact configuration of the installation, then use the
E-switch LL1105AF065Q switch . Power and grounding is provided by the
Arduino board . There is no specific reason for using this particular configuration. In fact, it is a little absurd to use the whole Arduino for power, but we made everything from spare parts, namely these parts turned out to be in the laboratory of our
co-working center , with the exception of switches. There were no two identical copies of at least some switch, so we had to buy several for calibration on the same equipment. The specific model does not matter here; Any switch with low ohmic resistance will do.
During tests, the
z
key was pressed — byte 29 was checked on the USB bus, and then the time of the first packet with the corresponding information was recorded. But as in the above situation, any key will do.
In reality, I do not really trust such a configuration, and to test a large number of keyboards, I would like to build a fully automatic installation. Although our results are consistent with the results of one other test, which was found on the Internet, for such a setup, the error is probably in the range from 1 to 10 ms. Although averaging the results of multiple test runs theoretically reduces the error, but since measurements are made by man, it is not necessary and even unlikely that errors will be independent and disappear after averaging.
I'm trying to find more models of phones and computers for measurements and would be happy to conduct a quick test on your system or device if it / it is not in the list ! If you live far away and want to donate a test device, you can send to my address:Dan luu
Recurse center
455 Broadway, 2nd Floor
New York, NY 10013