HackerTubewatch
Surprise me
Frame from How does a USB keyboard work? Plays via YouTube's privacy-enhanced embed

How does a USB keyboard work?

10 videos recommended on HN
YouTube
7 HN users recommended this tutorial6 months2021–2025 score 7
Years with an HN recommendation, 2007–2026

HN commenters recommend it as a clear, comprehensive explanation of USB signaling and keyboard polling.

Ben Eater explains how a USB keyboard communicates, covering the electrical interface, bit and packet encoding, packet contents, and a comparison with PS/2.

“Fantastic breakdown if you have 30 minutes” (HN, 2024)

2 strong recommendations · 5 recommendations · 5 citations · Tutorials · intermediate

12 Hacker News comments

From the HN archive; up to 20 kept per video, favoring different commenters. Recommendations first.

@jordibc Mar 2022 Strongly recommends
on HN thread The end of the nice GTK button
About the USB keyboard, that may be true only for the cheapest keyboard you could find, but basically not applicable anymore nowadays. Rather than giving you the details, let me link to this video, which is awesome at explaining it and much more -- the USB vs PS/2 part starts here: [this video]
Awesome explanation of USB vs PS/2
@wmwmwm Sep 2021 Recommends
on HN thread Keyboard Latency (2017)
There’s a great video here that goes through all this - the gist is that USB keyboards specify what polling rate to use, 1000hz for the best ones, maybe 125hz for the cheaper ones. An interesting thing about ps/2 is that even though it doesn’t have to wait for the keyboard to poll it transmits data at much slower speed than USB (khz vs mhz) which somewhat offsets the advantage it gets from being interrupt driven [this video] edit: ah, sorry, I see someone's posted a link to this video already!
Explains USB keyboard polling rates versus PS/2
@exporectomy Sep 2021 Recommends
on HN thread Keyboard Latency (2017)
Apparently [1] PS/2 limited by a slower data rate than USB 2.0 which cancels out almost all the advantage of its lower initial latency to begin the transmission, making them both about equally capable in actual latency - at least in theory. [1] [this video] Even if this conclusion is wrong, that video is a very pleasant and understandable explanation of the USB protocol.
Pleasant, understandable explanation of USB protocol
@throw0101a Nov 2021 Recommends
on HN thread What is AT&T doing at 1111340002?
> Embedded programming? Dealing with signals?! God forbid, man. "How does a USB keyboard work? by Ben Eater: * [this video]
Suggested as intro to keyboard signalling

Citations, criticism and jokes

@thristian Jul 2021 Cites it
on HN thread How does USB device discovery work? [video]
Read more
Piggy-backing this comment to add some context for the OP video: This "USB device discovery" video is actually the latest in a series of videos where Ben Eater is building a simple 8-bit computer on breadboards. He hooked up a PS/2 keyboard as an input device, and then got sucked into a tangent of investigating and explaining keyboard protocols. - He investigates the PS/2 keyboard protocol: [link] - Somebody on Patreon asked about USB keyboards having higher latency than PS/2, so he made a video about the basic USB protocol: [this video] - He made the OP video about USB keyboards being limited to holding six keys at once.
Context on Ben Eater's USB video series
@RJIb8RBYxzAMX9u Oct 2021 Cites it
on HN thread IBM PS/2 Keyboard Modification
I'd imagine it would be very difficult, and would require a relatively powerful MCU. Ben Eater's made a few videos discussing how PS/2[0] and USB keyboards[1] work. USB's a vastly more complicated protocol compared to PS/2. [0] [link] [1] [this video]
USB is more complicated than PS/2
@em3rgent0rdr Apr 2022 Cites it
on HN thread A blue connector does not USB 3.0 make
I'm sorry but serious question, why would you need a high-speed for a keyboard? A usb packet for a keystroke is roughly 180 bits (I'm estimating from glancing at [this video] ). So 1.5 Mbit/s low speed could roughtly handle over 8,000 keystrokes per second. Do you really need more keystrokes or finer resolution than that?
Used to estimate USB packet size
@jeroenhd Jun 2025 Cites it
on HN thread Writing a basic Linux device driver when you know nothing about Linux drivers
Read more
Serial ports still exist today. Even in desktop computers (though usually in weird underpowered ones designed for industrial applications and such). Even the most GAMING of motherboards have headers ready for one or even more serial ports to mess with. All you need is a cable and a card to slot into a PCIe bracket! USB itself, at least the 1.1 protocol that's still used for some devices today, isn't all that complicated in itself: [this video] Many if the complicated parts here, like device identifiers, are the things you'd need to manually configure if you were to use a serial port. Those hundreds of pages are similar to the hundreds of device types, vendors, and models that Windows would list when you clicked "add new hardware" back in Windows 98. When push comes to shove, you're just sending energy pulses down wires, there's just a chip in there that helps collect pulses so you don't need to manage the timing manually.
Shows USB 1.1 isn't that complicated

Video list and Hacker News comment labels from HackerTube (prompted by @karpathy), released under ODC-By 1.0, built on the open-index/hacker-news archive. Hacker News data is provided by Y Combinator; comments remain the work of their authors. Video titles, channel names and thumbnails belong to their creators and are shown via YouTube. HackerTube Watch is an unofficial edition. Data export of 2026-10-31.

Keyboard shortcuts

/
Search
j k
Next / previous video
r
Surprise me
l
Like (video page)
w
Watch later (video page)
?
This help
Esc
Close