Live data from Hacker News

Keyboard latency

danluu.com

111–120 of 274 posts

Re: Keyboard latency

#111
post #92

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…

> strike a key less than 100 ms after some visual stimuli, I'm sure I couldn't do it The video game "Super Hexagon"[1] is a surprisingly interesting demonstration of this limitation, and how the mind tries to workaround the problem. The higher difficulties ("hexagonest"[2]) seem impossible at first. In the easier levels you can react , but now the time it takes to see the scree, parse the simple graphics, recognize t…

That game ate way too much of my life.

Re: Keyboard latency

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

I immediately switched to skeptic mode when I saw no actuation points or normalization for travel distance. All this is showing is that to move further it takes longer. Duh. Why even bother pointing out the polling rate? That's like setting up runners at random places on the racetrack to measure who's faster. The guy/gal that starts closest to the finish line isn't necessarily faster.

I'm using Cherry MX Speed switches, which have a 1.2 mm actuation point and 45 g actuation force. There are no published numbers for the Apple keyboards and the closest I could find was ~0.75 mm distance and ~60 g force. Cherry MX Reds, the most common mechanical switches, have a 2 mm distance and 45 g force. (I mention the actuation force because there is probably a slightly longer delay for higher actuation forces due to deforming the fingertip and motor unit recruitment, both of which are probably minimal.)

On top of it, the author seems to be making a statement about speed being the deciding factor for gaming keyboards. If that was the case, they'd all be using ultra-low actuation switches, which they aren't. In most cases, a 'gaming keyboard' is just a mechanical keyboard with aggressive styling, higher quality components (less plastic, braided cable), macro keys, multi-key rollover, USB or audio passthrough, and backlighting.

Then he uses 1 membrane gaming keyboard and 1 no name import that I can't even find the manufacturer for as his only gaming keyboards. There are no sample sizes reported, he just does his best to hit two keys at once, and uses a camera for determining when the key press starts.

Every step of the process has huge flaws and he doesn't even use a reasonable set of devices. Sorry to sound harsh, but I trust zero of the conclusions/interpretations of the data.

Re: Keyboard latency

#113
post #106

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

Wiring each key to an input would get rid of scanning, not debouncing.

Re: Keyboard latency

#114
This article prompted the following questions for me:

1. How well did the historical systems do, and why? Presumably non-negligible key travel is not a modern invention.

2. How much of the latency is key travel? (i.e. what korethr said)

3. How exactly were the keys pressed/how fast were they pressed? All the article says about the experimental setup is "The start-of-input was measured by pressing two keys at once – one key on the keyboard and a button that was also connected to the logic analyzer."

Re: Keyboard latency

#115
post #5

On the debouncing thing, Razer announced one with optical switches instead of electrical.

Yep, also capacitive and Hall-effect switches don't need debouncing.

I think a couple of my Apple II clones had hall-effect keyboards. Too bad their graphics are not very competitive today.

Re: Keyboard latency

#116
post #11

Earlier quoted context omitted.

I wouldn't be surprised if the Apple keyboard is the fastest just because it has very shallow keys.

That's fine though. It's about the experience end-to-end. I love the apple keyboards. I still type faster on them than other keyboards, including high-end mechanical keyboards. The short keys and actuation feel responsive, yet I've never felt like I've accidentally triggered a key.

That's fine, but then the study should be called Key Size Comparisons rather than Keyboard Latency, since it appears that the length of time the key takes to travel dominates the "latency" measurement.

Re: Keyboard latency

#117
post #92

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…

> strike a key less than 100 ms after some visual stimuli, I'm sure I couldn't do it The video game "Super Hexagon"[1] is a surprisingly interesting demonstration of this limitation, and how the mind tries to workaround the problem. The higher difficulties ("hexagonest"[2]) seem impossible at first. In the easier levels you can react , but now the time it takes to see the scree, parse the simple graphics, recognize t…

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 conscious attention, even while holding a conversation, or while focusing at different parts of the screen, or spaced out. It feels like the fingers play by themselves.

This is so automatic that the player may have little feedback on how well they are doing. They may think they are making blunders and about to lose, while "the fingers" have correctly hit every note so far.

Definitely feels like a faster neural path was built.

Re: Keyboard latency

#118

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…

If you're trying this, note that libvte based terminals are capped at roughly 40fps, which adds serious jitter to the delay. xterm doesn't have this problem.

Re: Keyboard latency

#119

Earlier quoted context omitted.

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.

No the OP, but I used do the same thing.

I shifted my hand to the right so that my middle finger is on D, my ring finger moved forward and back (WS), and pinky for A.

That evolved from gaming on a laptop where I'd just rock my index finger back to hit C or shift my thumb forward and rock back on the space bar to jump. I got disturbingly good at Q3Arena on a Powerbook G3, yes, using the track pad. It inspired some bad ergonomic habits. haha

Now I just use Ctrl.

Re: Keyboard latency

#120
I have something interesting about USB input latency to share.

In 2014 I built a new computer with a i5-4590 CPU, ASUS Z97-A motherboard and 8GB of Kingston DDR3-1866 memory.

One thing I instantly noticed was that my mouse (Logitech G400) would feel "delayed" compared to my older computer from 2010 (i3-550, Intel DH55HC motherboard). I could have the same OS (tested Win7 and Ubuntu), GPU and monitor between both computers and switch, and the difference was that obvious.

Another problem I had was DPC latency under Windows with driver: "usbport.sys". USB audio would drop out in correlation with DPC latency spikes and I believe it was related to the mouse latency. Under Ubuntu I had the same problem and logged a dmesg message that said "retire_capture_urb: x callbacks suppressed", with the same symptoms.

I got so frustrated I stopped using the new desktop and went back to my old desktop and a new laptop for about 2 years, after wasting my time running Prime95, MemTest86 for over 24 hours, and swapping the motherboard with another model that let me disable HPET (Supermicro C7Z87-O)

In the end, last year I decided to work on it again and swap the memory with some Corsair 2X4GB DDR3-1333 memory and just like that, the DPC lag spikes were gone, USB audio didn't drop out and my mouse stopped lagging.

Post reply on HN