Live data from Hacker News

Keyboard latency

danluu.com

101–110 of 274 posts

Re: Keyboard latency

#101
post #84

I'm surprised the "humans don't notice 100 ms" argument is even made. That's trivially debunkable with a simple blind A/B test at the command line using `sleep 0.1` with and without `sleep` aliased to `true`. To my eyes, the delay is obvious at 100 ms, noticeable at 50 ms, barely perceptible at 20 ms, and unnoticeable at 10 ms. Not to mention that 100 ms is musically a 16th note at 150 bpm. Being off by a 16th note e…

The more obvious example is to watch a video encoded at 10 frames per second followed by a 30 fps video. Does it look different? If yes, something's wrong with the statement There are plenty of examples on YouTube if anyone's interested.

even the difference between 30 and 60 is pretty clear to most, I find watching movies at 60fps reeeally weird, it feels too real... I never actively look for the video framerate before, i just notice it, it's that obvious.

Re: Keyboard latency

#102
post #7

Earlier quoted context omitted.

I agree. Presumably he measured it the way he did because it's easier to measure, rather than because he thinks it's the more meaningful way. (Though maybe his way is more useful if he's interested in whether a keyboard gives an advantage in gaming, rather than whether it's pleasant to type with.)

If you want a clear point, then why not use the moment it bottoms out. So when key travel ends, instead of when key travel starts. In most cases, it'll be much closer to the actual activation. If you want to be even more thorough, publish both times (which you can get from a single video).

For long enough key travel times that could actually show a negative latency, which might be super weird.

Re: Keyboard latency

#103
I think this was posted to HN before, but in any case, related:

http://isitsnappy.com/

It's an iOS video app for measuring latency. The page has this about Apple keyboards: "This one’s bizarre: the onboard keyboards on both the 2015 Macbook Pro and Macbook Air have worse latency than an external keyboard. Plugging in an external wireless keyboard improves response latency by 40 ms."

Re: Keyboard latency

#104
post #2

IMO, a better measure would be from activation of the switch, as opposed to the beginning of key travel. I don't start waiting for the character to appear on my screen from the moment I begin to press down. My anticipation begins when I feel the tactile feedback of the switch activating (or the switch bottoming out on switches that don't offer tactile feedback). On a keyboard with good tactile feedback, I might not m…

Actual activation might be hard to get, but when the key bottoms out is probably the best way to go. Or even better, why not post both when key travel starts and when it ends. If people are really curious, they can model a linear scale and use the key response plot to guess exactly where the activation happens.

> when the key bottoms out is probably the best way to go

I disagree. One of the greatest benefits of mechanical keyboards is that they actuate before bottoming out. With some practice you can learn to type without bottoming out, which can greatly increase your typing speed, and decrease the amount of stress on your fingers and wrists.

Re: Keyboard latency

#106
Has anyone made the "direct wire to every key" keyboard? Getting rid of debouncing would be kind of cool.

Re: Keyboard latency

#107

Earlier quoted context omitted.

Most mechanical PS2 keyboards are a diode cascade. You pressing the key triggers a wave of electricity cross the keyboard which is converted into the PS2 waveform, and pumped out at the same rate of the incoming clock waveform. OLD PS2 keyboards don't generally have internal digital micro-controllers, they're effectively analog, the logic they do contain is blindly simple. This is why some struggle with N-Key Rollove…

This is absolutely untrue for any PS/2 keyboard, as well as for most pre-PS/2 PC keyboards (incuding AT and XT keyboards). All keyboards have always had a microcontroller in them which is responsible for scanning the key matrix and sending output over the serial link. (In PS/2, it's also responsible for reading input to change the state of keyboard LEDs.) There is nothing analog about them whatsoever. Here is a set o…

PS/2 and AT are also bidirectional protocols for controlling the LEDs, key repeat, and various other commands that at a minimum requires some sort of digital state machine to manage the interface.

Re: Keyboard latency

#108

Earlier quoted context omitted.

Yes, n-key rollover sometimes comes up. In practice, I've only had it become an issue in the wild either when more than one player is sharing the keyboard or, in some rare games, primarily simulators, where you might need to hold multiple keys.

If you hold C for crouching, you can't move on some diagonals and switch weapons at the same time. Many games/gamers use shift or ctrl now for crouch to work around that.

You might be thinking of ghosting as opposed to n-key rollover. Of course keyboards that address one tend to address the other as well, but still, small distinction.

That said.. how are you holding C to crouch? I assume for WASD movement. I just tried that and it's contorting my hand in weird and uncomfortable ways.

Re: Keyboard latency

#109
post #56

Earlier quoted context omitted.

Don't confuse throughout and latency. The mouse may be measuring and sending data every 1-2ms, but that doesn't say anything about the latency before the data is handled.

This is also a pretty important point: most monitors refresh at 60hz anyway even if your game seems to be measuring much higher framerates, so there's a worst case floor of ~17s on just visuals lagging behind input because you're waiting for the next screen refresh anyway. The mouse measuring data every 1-2ms will increase the quality of the motion tracking, but it won't necessarily help you with latency unless the d…

True, though these days 144Hz monitors are everywhere (Personally I used a CRT until LCDs were capable of 120Hz, not sure I could ever go back to 60), makes a big difference I think when down to a 7ms window. Using a mouse at 125 on a modern screen feels really janky.

Re: Keyboard latency

#110
post #89
post #87

Earlier quoted context omitted.

25ms is 1.5 * (1/60)... Is your monitor running at 60Hz?

Your probably right, it's an old TN panel in a 10yr old laptop... I'm gona have to steal someones shiny modern IPS in a minute :P (I know they are generally slower response but it's 10 years newer so you never know) [edit] No IPS still super slow. How common are >60Hz computer displays these days?

If you want to have some fun, try testing your reaction time at https://www.humanbenchmark.com/tests/reactiontime.

It's not quite a keyboard delay test but more of a general human reaction time test.

The best I can do is 160ms after 5 tries on a 2560x1440 60hz IPS panel.

Post reply on HN