Break down USB keyboard interface with old-fashioned pen and paper

What’s better for gaming, old PS/2 style keyboards or modern USB devices? [Ben Eater] sets out to answer this question, but along the way, it ends up breaking the entire USB keyboard interface.

It turns out that PS/2 and USB are very, very different. A PS/2 keyboard sends your keystroke every time you press a key, as long as it’s powered on. A USB keyboard is more polished, it won’t send your keystrokes to the PC until it asks for them.

To help us understand the more complicated transactions of USB, [Ben] prints the oscilloscope trace of a USB exchange between a PC and a keyboard and deciphers it using a simple pen and the USB specification. We were surprised to see that the USB D+ and D- lines are not only a differential pair, but also have more complicated signaling behavior. To investigate how USB handles multi-key failover, [Ben] even borrowed a sophisticated oscilloscope that automatically decodes USB data packets.

Turns out newer isn’t always better – the cheap low-speed USB keyboard [Ben] tested is much slower than its trusty PS/2 model, and even a much nicer keyboard that uses the faster full-speed USB protocol is still about as fast as PS/2.

If you want to dive deeper into keyboard protocols, check out [Ben]PS/2 keyboard interface, complete with an integrated hardware decoder. If these keyboards have too many keys for your liking, you might consider this USB Morse code keyboard. Thanks to Peter Martin for the tip!