Live data from Hacker News

Keyboard latency

danluu.com

241–250 of 274 posts

Re: Keyboard latency

#241
post #199

Earlier quoted context omitted.

I can get it down to 1ms, so there's probably something wrong with my setup. (I just look for how the cursor moves; on the delayed one, I can discern the presence of the cursor on the next line for a split second.) Maybe monitor refresh rate, or the minimal resolution sleep can handle? I'm using Alacritty, which is supposed to be really fast and everything!

Likely forking sleep takes time.

I would be extremely surprised if fork on a unix-like takes 1ms.

Re: Keyboard latency

#242

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…

But that could be 200 ms? 100 from your keyboard and 100 from sleep.

Re: Keyboard latency

#243
post #223

7 lines of CSS to make this website more readable: body { max-width: 40em; line-height: 1.5; font-size: 18px; margin: 0 auto; font-family: sans-serif; } Copy and paste them into your DevTools and enjoy this great post!

What's it with font-size recommendations getting larger and larger every year? When I started writing CSS for my websites, the standard font-size was 12px (sometimes 10 or 11).

The dot sizes of screens are decreasing. Also the resolutions were lower, so we had to save space.

Re: Keyboard latency

#244
I'm looking for a low-latency, NKRO, chiclet-style keyboard. Would freak out if it also had individual LED backlights. Build it, and I promise to successfully market it as a musical instrument.

P.s.: I currently use external Apple keyboards to perform & make music (with things like http://qwerkey.xyz).

Re: Keyboard latency

#245
post #28

PS/2 keyboards are used by serious gamers because the scan rate is higher than USB. See https://superuser.com/questions/16893/do-usb-or-ps-2-keyboar...

The PS/2 protocol is incredibly slow. Just sending two bytes over the wire via PS/2 takes 1.3 ms.

True. But that is throughout, not latency. Key presses are latency limited, not bandwidth limited.

Re: Keyboard latency

#246
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…

Your point is addressed in the appendix.

> Note that, unlike the other measurement I was able to find online, this measurement was from the start of the keypress instead of the switch activation. This is because, as a human, you don’t activate the switch, you press the key.

He mentions the fact that some keys activate mid-travel, and that the very short travel is part of what makes the Apple keyboard so fast.

Re: Keyboard latency

#247
I'm using a das keyboard 4 on an iMac and did some tests to see what kind of latency different programs had for the cursor moving with just personal observations. iTerm seems to be significantly slower to move the cursor than Chrome or TextEdit.

Before seeing this article I've thought that iTerm seemed slow before to show text, it'd be nice to see a writeup on how long it took for text to render after keyboard input on a few different programs to get developers to use the same methods to keep this as quick as possible.

Re: Keyboard latency

#248
post #145

Earlier quoted context omitted.

This is also clear on rhythm games like Stepmania. Here's a random video from a keyboard user: https://youtu.be/TWiMnENdcyY?t=56 At this speed the player is reacting (and hitting with correct timing) about ten notes (arrows) per second. This is possible by memorizing and reacting to group patterns instead of individual notes, but more importantly, reacting unconsciously. A player can play at this level without consci…

A big difference between Hexagon and most other rhythm games like Stepmania, Beatmanias IIDX, Guitar Hero, etc , is that pattern is the same. Just like musicians memorize complex music that they later perform[1] with precise timing, the same is possible for these step/note patterns. I've personally seen someone perform one of the insane speed/note-density DDR songs blindfolded . Humans have surprisingly good internal…

While the order of the walls in Super Hexagon is random, each level has a predetermined set of walls. Once you identify which wall pattern is coming you know exactly the maneuver needed to traverse it.

This makes Super Hexagon more a game of quick pattern recognition than reaction time.

When I play it I am generally focused at the edges of the screen to quickly identify the next pattern and only using my peripheral vision to maneuver around the walls in the center.

Re: Keyboard latency

#249

PS/2 keyboards are used by serious gamers because the scan rate is higher than USB. See https://superuser.com/questions/16893/do-usb-or-ps-2-keyboar...

I'm unaware of any pro gamer (or streamer) that's using PS/2, and that's about as serious a gamer as you get. Most are using a late model mechanical keyboard connected via USB, often with lots of RGB just because. I think the only PS/2 holdouts you'll find are the old Korean Starcraft players that are still using a Qsenn DT-35.

Pro gamers are paid to use whatever their sponsors want them to use. And if their new fancy keyboard is good enough not to negatively affect their game, I don't see why they would turn down the money.

Re: Keyboard latency

#250
post #88

Earlier quoted context omitted.

This rule comes from UX design user studies. However, the actual rule is that people perceive an event happening within 100ms as "instantaneous". Or, in other words, two events happening within 100ms of each other won't feel like distinct events. This doesn't mean that users won't notice the delay and it doesn't even mean users won't be frustrated by it, it's just a matter of human perception of distinct events in ti…

I rarely use transitions larger than 100ms in UX, I doubt i'm abnormal in not seeing the result as instantaneous (compared to no transition). On the other hand this certainly is not normal UX design, I am very irritated at how common excessively long transitions are used on the web... to the point that I actually have to wait for things to finish animating before I can interact with them, it feels so 90's like i'm su…

It's about the attention span. If the animation or action happens within 100ms then it's percieved as very fast and has almost no negative effect on attention. If the action takes 1 second then it is merely percieved as fast but very noticeable. If an action takes more than roughly 3 seconds it's percieved as slow and you might lose the attention of your user.

Just because you are below the threshold of 100ms doesn't mean that reducing it more isn't beneficial. It's just that you have alread captured the full attention of your users.

Post reply on HN