Trackpad for a desktop.

I'm sorry, but this is total bullshit. USB has a bandwidth of lets say, 10 megabytes per second (its actually much faster). Now lets say that we have 127 or fewer keys on our keyboard. This means that each transmission should be 1 byte (8 bits.) This means that every key press should take 1/10,000,000th of a second to transfer over USB. (very fast professionally engineered hardware)


Now as a hobbyist, with an arduino I have access to a device with 115,200 baud speeds over USB, or 14,400 key-presses per second. I have actually saturated a 115,200 baud connection before using arduino, and the response time was as expected, 69 microseconds. Not 69 milliseconds, 69 microseconds. A full 2 orders of magnitude faster than the amount of lag humans are able to perceive. By the way, this super shitty example with hobby grade hardware operates at only 14.4 killo-bytes per second. Simply by upping the clocks on everything another 2 orders of magnitude of speed would be EASY to achieve, and that is still an order of magnitude less than an average use case maximum for the USB standard.


PS2 has a maximum poling frequency 200 hrtz according to Wikipedia. Assuming each poll can capture the entire keyboards state (n-press-rollover and all) We need 128 bits to do so (127 keys plus 0 for none pressed) so the baud rate is 200*128=25,600 (which is 4.5 times slower than even the super shitty keyboard made from an arduino). A high end keyboard with custom drivers capable of using the entire USB speed protocol would obliterate this in speed, capable of sensing more than 400 times the key-presses per second.


What about latency?

On windows, the default USB keyboard buffer size is 100. I am going to use this as a starting point for what most gamers would be incapable of exceeding. (pressing 100 keys before the operating system can come back and clear the buffer). What this means in broad terms, is that the USB data lines must be saturated to ~100 times the data transfer rate of PS2 to beat them in terms of latency. A modern keyboard is easily capable of doing so. and assuming 100 is a hard limit that should be practically impossible to exceed it means that USB keyboards will have less latency than PS2 keyboards at even lower data transfer speeds.


TLDR; USB is so fast that humans are hundreds or even thousands of times too slow to feel the latency introduced. If you are gaming at 60 frames per second then even the shittiest keyboard on the planet should be able to manage 240 key-presses PER FRAME. A decent gaming USB keyboard should 50 or 100 times faster. Do you think its possible for a human to tell if they are playing on a keyboard with 12,000 or 24,000 key presses per frame? I don't think so. Additionally USB keyboards can brute force past latency speeds. A buffered input that receives, buffers, and flushes in .2 seconds will have less latency than an interrupt based input that takes 1 second to transfer its data after generating the interrupt. If a usb keyboard is outperformed by a PS2 keyboard, the engineers who designed it should be ashamed. A hobbyist with a couple arduinos and some time can build a USB keyboard circuit that outperforms a PS2 keyboard by a huge margin without even bothering to do packet optimization or compression. Once you allow the USB keyboard custom drivers all of these numbers get even worse for the ps2 keyboard.

/r/DiWHY Thread Parent Link - i.imgur.com