Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Having just seen some commercial or other I just realized there could be such a thing as a high-latency keybard - as compared to a low-latency keyboard. If so then maybe a low-latency one could be yet another good thing to make all my coding experiences that tiny bit more wonderful.

But I am having a lot of trouble finding the research about this, as opposed to marketing! Where is some authoritive or at least useful information?

How bad is 'standard' keyboard latency? Are we talking milliseconds? Tens of milliseconds?

What are the technology limitations involved in the software/hardware protocols PS2, USB, USB 2.0, USB channels, interrupts, etc? Has nobody cared about this enough to study it and publish?

share|improve this question

migrated from Jun 19 '10 at 6:16

This question came from our site for professional and enthusiast programmers.

@Mark: As always, game players will likely care about this. – Yann Ramin Jun 19 '10 at 5:56
@Mark: All the time. Bluetooth and RF Keyboards have notorious lag. Perhaps not noticeable to most people, but for myself and other hardcore FPS players, it's a night and day difference. – Alan Jun 19 '10 at 5:57
@Mark: I get this just typing on plenty of keyboards, particularly wireless – Graphain Jun 19 '10 at 5:57
To answer your offtopic question: keyboard latency is less with hardware, and more with the resolution of the clock. I use to work with keystroke dynamics for 2nd auth factor, and we measured key latency. This is a pretty decent paper on it:… – Alan Jun 19 '10 at 6:01
And, if you're interested. Looking up information on Keystroke Dynamics--using unique typing rhythms to provide 2nd factor authentication. There is gobs of information regarding keyboard timings. Interestingly enough IE's javascript timing resolution is bad! – Alan Jun 19 '10 at 6:04

For USB keyboards, the latency is going to be bounded by the USB polling rate. USB only transfers data from an end device when the host actively polls it - there is no concept of exception sends.

USB devices can specify their polling rate (for "interrupt" endpoints, not for bulk or control endpoints). In general, most keyboards and mice will have a latency around 4ms, though it can be higher. By setting the descriptor to a small value (1ms for full speed, 125us for high speed) you can improve the USB latency. You can have a look at the endpoint descriptor field layout.

share|improve this answer

You must log in to answer this question.