7 ms·
33 ms is two frames, if your monitor is at 60 Hz. If you tried vscode or other electron app, it might be 49 ms (3 frames). These are the numbers I'm getting fro
by vetinari 9y ago
33 ms is two frames, if your monitor is at 60 Hz. If you tried vscode or other electron app, it might be 49 ms (3 frames). These are the numbers I'm getting from 1900X with Nvidia 1080 GPU, Gnome3, 4k@60hz, but without measuring latency of the keyboard itself.
Modern keyboards are another part of the problem. They can also take their sweet time since keypress until packet appears at the USB bus. See https://danluu.com/keyboard-latency/ https://danluu.com/keyboard-latency/
- acdha 9y agoFor reference, on a 2012 MacBook Air the numbers are 18-20ms in either a regular app or VSCode.
- vetinari 9y agoI'm getting min 18.5-avg 24.3-max 35.2 ms in vscode on 2015 rMBP. However, the test won't finish and Typometer complains ("Previously undetected block cursor found"). In Emacs, it won't run at all.
- floatboth 9y agoModern motherboards often still have a PS/2 port! And most USB keyboards still support PS/2, a passive adapter works great.
- vetinari 9y agoThe problem is often in keyboard controller, not in the interface. Apple managed to get fastest keyboard with only 15ms lag; other may be order of magnitude slower.
- fhood 9y agoCould someone explain to me why on earth 15ms of lag for a key press is considered good? It is a switch for gods sake. It should be near instant.
- vetinari 9y agoThe linked article explains it (TLDR: key travel time, scanning keyboard matrix, debouncing).
- madez 9y agoA keyboard doesn't need to implement a scanning matrix. It could hook up all keys individually to a an own IO-Port.
- falcolas 9y agoRequires a bigger chip (100+ IO pins) and more complex wiring diagrams than most inexpensive keyboard makers are willing to invest.
- StillBored 9y agoReplace with _any_ keyboard manufacture.. Similarly, while your keyboard may advertise USB2 or even USB3, the actual key-press USB interface is always running at USB 1 low speed (1.5Mbit). I spent a fair amount of time trying to find a keyboard to work on a device that I have that only works with high speed devices, 30 or 40 keyboards later I gave up... If someone actually knows of such a thing I would be interested. Same basic problem with mice.. I guess the thought-process is that hey USB2 supports split transactions, and the keyboard/mouse won't actually generate even 1.5M bit of data, so we are going to continue to sell the same basic mouse/keyboard interfaces we were selling 20 years ago wrapped in styling variations. PS: Some of the physical button keyboards I found with configurable colors/etc, usb hubs, do support USB3... For the color controls, or hub. The keyboard endpoint is still at low speed...
- falcolas 9y agoLikely because they want to implement the minimum necessary HID spec (or, in a nicer tone, the HID spec with the most compatibility), which would be the one supported by the BIOS.