5

Is there a program to test how much delay in e.g. my keyboard is okay?

I have friends who are saying certain keyboards (especially Bluetooth keyboards) are slower etc. Now I wonder if or better how much delay they or I even can notice. There are programs and websites that "measure" the delay. But I am searching something that actually simulates the delay to challenge the friends.

2
  • That is a bizarre web site. Certain keys are consistently reported as having up to half the latency of other keys, uncorrelated with their spatial position. It's unclear to me exactly how it can even work, because as far as I know there is no way for the operating system to know how long it takes from when you press a key until the key is reported to the OS. Even going beyond that, if the keyboard is polling, it cannot know itself anything other than it wasn't pressed in one polling period and was the next. Now throw browser limitation into the mix, and ??!
    – Michael
    Commented Mar 27, 2023 at 20:17
  • you are absolut right! I think it just takes the minimal time between two key events... It was just the first example that i could finde. There are better installable programs - but as you say with out dedicated hardware: nothing perfect...
    – mtooling
    Commented Mar 27, 2023 at 20:19

2 Answers 2

9

I have implemented UI Delay Simulator. It allows setting a "lag" between 0 and 1000ms. It affects mouse and keyboard. Have fun.

It runs on Windows and is gratis and free (MIT license).

I'm not sure whether it works well with games. Games might access hardware in a more direct way. It certainly doesn't work with gamepads and joysticks.

0

IMHO this is pure nonsense unless you don't measure it in a lab, with some instrumentation.

Let's see what happens, in a very simplified scheme:

  1. Your finger presses on the key. Maybe you can consider it obvious, but you have to command it to move and feel the physical feedback. This takes time, even for the feedback alone it's in the milliseconds' range. Say for simplicity that you're doing this part with a robotic finger and that you record a timestamp of the event
  2. The keyboard controller scans the keys and discovers your key's pressed. Fine. This takes time, depending on the keyboard connection matrix, but if you're with a fast enough device maybe it's just microseconds (there are some keyboards sold to have no matrix scan, fast key reads, etc.). Oh well, not considering the debounce algorithms... because pushing and releasing are two well-defined states
  3. Then the keycode has to be sent to the PC, which is a variable timing due to bus/line/channel operation - USB speed, controller operation; if with a radio channel, there's a possible delay due to radio interference.
  4. Now is the time for the BIOS/device driver/OS queueing and de-queueing of the event, sending it to an application that registered itself for receiving it.
  5. The application will then have to do something with it, at its own pace.

Anything that any simple software alone can do is on points 4-5, while for the first three, you have no way to measure the impact. Unless, as I said, you timestamp every event with an independent external instrument, that can correlate all the steps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.