Closed dumblob closed 3 years ago
First, it's not optimized for latency.
Second, I haven't done any measurement.
And third, keyberon is a library, so it depend highly how you plug the building blocks together and on which MCU and environment (compiler version, compiper options, bare metal, OS...) you run it.
With my nose, on some random stm32 at 48MHz, on my implementations based on RTIC, you have less than 1ms of work for a keypress. Add it 5ms of debounce and 8ms of USB polling, you should have 14ms of worst case latency. Then, add the OS delay.
Thanks for a prompt reply!
The resulting "educated guess" seems to me too good to be true - could you and others reading this discussion check the article I linked in my initial post or maybe take your new iPhone (or other higher-speed camera as mentioned in the article) to quasi-measure how the latency looks like with your keyboards in practice?
Sorry, but I don't care about latency enough, and I don't have a fancy smartphone. The article didn't explain what is measured. I suspect that the OS part, from the USB wires to the LCD of the monitor is an important part of the latency, so it depends a lot of the OS.
You can flash a bluepill or similar MCU and check yourself.
After reading the appendix, there is 32ms for pressing the switch. As most mechanical keyboard acuate in the middle (except gamers "fast" switches), you add to my estimations 16ms, so my keyboard should be at about 30ms with his experimental method, that is close to an ergodox or a planck, that are measured at 40ms. Seems coherent.
For your information, I scan at 1kHz, and debounce if I read the same value 5 times, so 5.5ms.
Hi, I'm new to keyberon and would like to know whether it is optimized for latency (scan rate, debouncing, ...) as per https://danluu.com/keyboard-latency/ ?