Hacker News new | ask | show | jobs
by ahartmetz 1600 days ago
AFAIK you'd have to have a pretty bad keyboard for it to have a significant role in latency. I guess specialized hardware (based on a microcontroller with built-in USB host support) wouldn't be too hard to construct if you really needed to know.

For the camera measurement, I would just press the key as fast as possible and pick about 3/4 of the way down as the trigger point.

2 comments

> AFAIK you'd have to have a pretty bad keyboard for it to have a significant role in latency

https://danluu.com/keyboard-latency/ puts a lot of keyboards >= 30 ms which is an insane amount of latency

So if you check the appendix section, they say they're measuring latency not when the keyswitch makes contact, but when the finger first begins pressing on the key. So they're taking key travel time into account, and that ends up being the majority of the "latency".

It's a fair point for the gaming argument they make, if you want to jump 30ms quicker you'll need shorter keys. But it's not really correct to say the keyboard is adding so much latency when it's actually the user.

> So if you check the appendix section, they say they're measuring latency not when the keyswitch makes contact, but when the finger first begins pressing on the key. So they're taking key travel time into account, and that ends up being the majority of the "latency".

The key travel time on https://www.amazon.com/gp/product/B0000U1DJ2/ and https://www.amazon.com/gp/product/B00DGJALYW is substantially the same, yet one has 20 ms of latency, and the other 55 ms.

I built one! Arduino Leonardo and a light dependent transistor:

https://github.com/willmuldrew/lagmeter

(It attempts to do a few other things but it’s best for measuring keyboard event to screen update latency)