How does n-key rollover work?

  Переглядів 236,481

Ben Eater

Ben Eater

2 роки тому

Support these videos on Patreon: / beneater or eater.net/support for other ways to support.
------------------
Social media:
Website: www.eater.net
Twitter: / ben_eater
Patreon: / beneater
Reddit: / beneater
Special thanks to these supporters for making this video possible:
Aleksey Smolenchuk, Alexander Wendland, Andrew C. Young, Anson VanDoren, Anthanasius, anula, Armin Brauns, Ben, Ben Cochran, Ben Kamens, Ben Williams, Benny Olsson, Bill Cooksey, Binh Tran, Bouke Groenescheij, Bradley Pirtle, Bradley Stach, Brent Reusing, Brian T Hoover, Bryan Brickman, Burt Humburg, Carlos Ambrozak, Chris, Christian Carter, Christopher Blackmon, Dale Andrew Darling, Daniel Jeppsson, Daniel Tang, dans, Dave Burley, Dave Walter, David Brown, David Clark, David Cox, David Dawkins, David House, David Sastre Medina, David Turner, David Worsham, Dean Bevan, Dean Winger, Dilip Gowda, Dissy, dko, Dmitry Guyvoronsky, Dušan Dželebdžić, Dzevad Trumic, Eric Dynowski, Erik Broeders, Eugene Bulkin, Eveli László, George Miroshnykov, Harry McDow, hotwire33, Ingo Eble, Ivan Sorokin, James Capuder, james schaefer, Jared Dziedzic, Jason DeStefano, Jason Specland, JavaXP, Jaxon Ketterman, Jay Binks, Jayne Gabriele, Jeremy, Jeremy Cole, Jesse Miller, Jim Kelly, Jim Knowler, Jim Van Meggelen, Joe Beda, Joe OConnor, Joe Pregracke, Joel Miller, John Fenwick, John Hamberger jn., John Meade, Jon Dugan, Joseph Portaro, Joshua King, Jurģis Brigmanis, Kai Wells, Kefen, Kenneth Christensen, Kitick, Koreo, Lambda GPU Workstations, Larry, László Bácsi, Lucky Resistor, Lukasz Pacholik, Marcos Fujisawa, Marcus Classon, Mark Day, Marko Clemente, Martin Noble, Martin Roth, Mats Fredriksson, Matt Krueger, Matthäus Pawelczyk, Matthew Duphily, Maxim Hansen, melvin2001, Michael Tedder, Michael Timbrook, Michael Weitman, Miguel Ríos, mikebad, Miles Macchiaroli, Muqeet Mujahid, My Yiddishe Mama, Nicholas Counts, Nicholas Moresco, Not Yet Wise, Örn Arnarson, Paul Pluzhnikov, Paul Randal, Pete Dietl, Phil Dennis, Philip Hofstetter, Phillip Glau, PixelSergey, ProgrammerDor, Randal Masutani, Randy True, raoulvp, Renaldas Zioma, Ric King, Richard Ertel, Rick Hennigan, Rob Bruno, Robert Comyn, Robert Diaz, Robey Pointer, Roland Bobek, §çīŤøşHï ŇåĶąýŐbŕÔ, Scott Holmes, Sergey Kruk, Shelton, SonOfSofaman, Stefan Nesinger, Stefanus Du Toit, Stephen, Stephen Kovalcik, Stephen Riley, Stephen Smithstone, Steve Jones, Tayler Porter, TheWebMachine, Thomas Bruggink, Thomas Eriksen, Tim Walkowski, Tom, Tom Yedwab, Tommaso Palmieri, Tyler Latham, Vincent Bernat, Vladimir Solomatin, Walter Montalvo, Warren Miller, Wim Coekaerts, xisente, Yee Lam Wan

КОМЕНТАРІ: 865
@ViktorRucky
@ViktorRucky 2 роки тому
The main thing I'm getting from this is that the calculator button on my laptop was not the invention of bored Asus engineers trying to make their own not-compliant keyboard spec, but rather the work of bored Asus engineers reading through the USB HID spec and finding the mention of a calculator button and deciding to put it in.
@Kitulous
@Kitulous 2 роки тому
i thought it called some sort of command and passed literal calc.exe in there or something lol not win+r ofc bc it would show the gui for a split second
@CristalianaIvor
@CristalianaIvor 2 роки тому
there are many interesting keys that you could use
@DaffyDaffyDaffy33322
@DaffyDaffyDaffy33322 2 роки тому
@@Kitulous that is a thing though too. The "lock" key on my laptop presses win+L
@ivesennightfall6779
@ivesennightfall6779 2 роки тому
laptop keyboards normally use a PS/2 connection (at least the ones where I've looked inside), so it's more likely that they use whatever keys windows has mapped to open the calculator (I seem to remember it being one of the higher function keys but oh well)
@huberthans4312
@huberthans4312 2 роки тому
@@ivesennightfall6779 PS/2 does not exist anymore. Even if this protocol is supported, its not handled like PS/2 anymore
@mightythimble4942
@mightythimble4942 2 роки тому
Right at the 11 minute mark is where the magic really starts to light up for me "it's not doing the thing... but we could tear it apart and make it do the thing" lol I love it
@inkrpen
@inkrpen 2 роки тому
My exact thought as well! The gears started turning in my head when he said there was a USB hub on the device.
@wagyourtai1
@wagyourtai1 2 роки тому
I probably would've just gone to wireshark's usb mode before taking it apart
@HuskyNET
@HuskyNET 2 роки тому
Also, he probably could’ve just plugged it in an old USB 1.1 hub/port (maybe there is even a way to restrict the speed within Linux).
@smartperson1
@smartperson1 2 роки тому
@@HuskyNET That might work. This also has me wondering: how complex is it for a USB 2.0 (or 3.0 hub) to pass along comms from a USB 1.1 downstream device? Does it buffer the 1.1 data then blast it over a 2.0 connection? Does it send the signals exactly as received (at 1.1 speeds)?
@Niosus
@Niosus 2 роки тому
@@smartperson1 given that USB is packet based, I can only imagine that the hub only forwards complete packets, which means it needs to buffer. It only needs to be able to hold a single packet per port.
@Otakutaru
@Otakutaru 2 роки тому
Came for n key rollover, got a whole USB keyboard masterclass for dummies
@UCm0i6w5lBlRthCtZEoj99tg
@UCm0i6w5lBlRthCtZEoj99tg 2 роки тому
Louis Rossman probably freaking out at how little Flux was used
@BigYoshi826
@BigYoshi826 2 роки тому
and how cold the joint seemed
@efeyzee
@efeyzee 2 роки тому
1 milliPaul of flux (10cc) is the minimum per joint. Come on, guys
@theLuigiFan0007Productions
@theLuigiFan0007Productions 2 роки тому
@@efeyzee I prefer to use at least 1 centiPaul (10 miliPaul) for optimal shineyness. /s
@233kosta
@233kosta 2 роки тому
We're talking femptoPauls here!!! It's a disgrace!
@heh2393
@heh2393 2 роки тому
Pauls of flux lmao I love the man
@JeffGeerling
@JeffGeerling 2 роки тому
I'm loving this series.
@stevensexton5801
@stevensexton5801 2 роки тому
Damn it Jeff, This is the second time I've caught you watching instead of making videos.
@karmanyaahm
@karmanyaahm 2 роки тому
This and LTT
@GameBacardi
@GameBacardi 2 роки тому
@@karmanyaahm LTT ? Nah...
@rmatt53
@rmatt53 2 роки тому
You think he could do something with LUFA? Program his own keyboard?
@JeffGeerling
@JeffGeerling 2 роки тому
@@stevensexton5801 lol, I can't miss a Ben Eater video!
@asedtf
@asedtf 2 роки тому
On one hand, I miss breadboards. On the other hand, I can't wait for the video where he adds a USB keyboard to his breadboard computer
@zolan4277
@zolan4277 2 роки тому
You can't get much better than a guy that is willing to rip open a DAS keyboard and solder wires to the board just to see how it works and also uses vim. I am learning so much from this channel and re-learning a bit too. Thank you Ben!
@lefteriseleftheriades7381
@lefteriseleftheriades7381 2 роки тому
I am a software developer, not a computer engineer, but i could follow the video beginning to end, understanding everything. You talk on point, explain in depth, easy to follow, all questions answered and easy to digest. Truly excellent quality videos.
@NickiRusin
@NickiRusin 2 роки тому
Time to learn about another aspect of computer hardware I've never heard or thought of!
@To-mos
@To-mos 2 роки тому
3D printing custom keyboards and programming them with Arduinos is an entire culture.
@r6u356une56ney
@r6u356une56ney 2 роки тому
You could also find an old USB 1.2 hub and put that between the PC and KB - it would force it to be 12Mbit only. Alternately, you might be able to tell the PC to force that specific port to be USB 1.2 only.
@NeatNit
@NeatNit 2 роки тому
Alternatively, do it the fun way! Which is what he did :)
@squelchedotter
@squelchedotter 2 роки тому
If you wanted to do it the easy way, you could just ask the OS to tell you what it's doing
@doctorbobstone
@doctorbobstone 2 роки тому
Yeah, I was expecting him to go that route, too. This was cool, though.
@andreasgrothusheitkamp1897
@andreasgrothusheitkamp1897 2 роки тому
Yes and No... then you have the problem to find the Keybord data betwen the Hub data. Even by lowering the speed in other ways the build in Hub stays activ. I don´t know how much data the Hub actually sends and recives for config and later adressing. But i would think realtime triggering won´t realy work any more.
@cryptearth
@cryptearth 2 роки тому
well, I was digging around - but couldn't find any about usb 1.2 what I was able to find: the "original" uhci 1.0 spec, the later "somewhat of a bug-fix update" ohci 1.1 spec, the ehci 2.0 spec - and all that xhci 3.x stuff
@ifohancroft
@ifohancroft 2 роки тому
Here's how NKRO should work accodding to the spec, but I'm writing from memory, so take it with a grain of salt: A keyboard should implement NKRO using the bitmap method as shown on this video. I am not sure what this mode is called. Then, the BIOS should send a specific 'SET REPORT' and the keyboard should switch to boot mode (6KRO) since BIOSes and certain other things have only a tlite" USB implementation. However, some BIOSes don't send that SET REPORT so the keyboard won't switch to boot mode and therefore it won't work in that BIOS. There are many ways to get around that: - Having a button/key combo to force the keyboard into boot mode (like the keyboard into the video) - Report both 6KRO and NKRO endpoints? (can't remember if endpoints was the correct term here) but don't report any keys in the 6KRO descriptor. BIOSes that that don't send SET REPORT don't usually check so that works. The OS ignores the boot mode and the BIOS ignores the NKRO endpoint and the keyboard works everywhere. (No idea how many keys can actually be sent to the BIOS in that case though) - I am guessing the reason for some keyboards to implement multiple virtual 6KRO keyboards would be so it works with buggy BIOSes while also get NKRO on the OS. However, if the NKRO isn't implemented according to the spec by default, but only as part of the workaround, you may not actually have the NKRO working on every OS.
@RoamingAdhocrat
@RoamingAdhocrat 2 роки тому
Thanks - I'd often wondered why on earth I'd need an option to turn NKRO off!
@alexc4924
@alexc4924 2 роки тому
I heard older versions of Windows had problems with >6KRO because they assumed everyone would implement their keyboards like the spec example did.
@ifohancroft
@ifohancroft 2 роки тому
@@alexc4924 That's possible. I don't know anything about that.
@bltzcstrnx
@bltzcstrnx 3 місяці тому
This is an issue before 2015. As far as I know, even cheap NKRO keyboards nowadays implemented it correctly. Some don't even have a way to switch between 6KRO or NKRO. It just stays at NKRO all the time. The device manager also only shows a single keyboard connected. So no multiple keyboard hacks.
@rupeshnikale619
@rupeshnikale619 2 роки тому
Doesn't matter how long his video are I never get bored.❤️❤️
@MsThekiller02
@MsThekiller02 2 роки тому
Had a computer architecture exam and he literally saved my rear end with his videos. Never gets old, this guy's awesome
@rabiulchowdhury2170
@rabiulchowdhury2170 2 роки тому
The longer the better!
@fletcherreder6091
@fletcherreder6091 2 роки тому
I hadn't looked at the time till you mentioned it, but that didn't _feel_ like a half hour.
@rachelteller9582
@rachelteller9582 2 роки тому
Damn if only i had a professsor like him during my engineering this man is just awesome 🤓🤓
@supersonictumbleweed
@supersonictumbleweed 2 роки тому
Not only that but with the stress of going to university building that everyone said is "necessary" and "good for me"
@OntologicalQuandry
@OntologicalQuandry 2 роки тому
It would have been interesting, if you had torn the keyboard down further, to see where the per-key diodes were located: either in the key switches or on the PCB/flex to which they mount. You may find it interesting that at BlackBerry, we had a specific key matrix routing that made certain key combinations unable to cause roll-over issues. This permitted faster (and somewhat clumsier) typing with fewer errors as well as certain user control sequences of multiple keys without having to put diodes in per key. I was involved in the first project that mixed a touchscreen with a keyboard and was able to get rid of the complex routing since the control sequences would all be entered through the touchscreen. This allowed us to do something more inventive with the keyboard to make it compatible with the proximity to the cellular antennas as well as implement the keyboard's own touch sensor array for gesture input. The specific keyboard technologies as well as the Industrial Design of the keyboard is why BlackBerry jealously guards its IP to this day.
@toddmarshall7573
@toddmarshall7573 2 роки тому
Does BlackBerry still exist?
@rigaudio
@rigaudio 2 роки тому
That's really interesting. How long did you work there?
@OntologicalQuandry
@OntologicalQuandry 2 роки тому
@@toddmarshall7573 yes, I'm still there.
@OntologicalQuandry
@OntologicalQuandry 2 роки тому
@@rigaudio I still do
@avrahamhollander9296
@avrahamhollander9296 2 роки тому
The reason he didn't do that is because it was a nice mechanical keyboard (from the sound) and he didn't want to destroy it.
@Ziferten
@Ziferten 2 роки тому
Keysight, send this man a proper active probe and a pamphlet on probing. My inner SiPi engineer is still crying.
@pierrelemoine8669
@pierrelemoine8669 2 роки тому
What is SiPi an abbreviation for?
@Ziferten
@Ziferten 2 роки тому
@@pierrelemoine8669 Signal integrity / Power integrity. The guys who you consult to make sure your PCB design isn't going to ruin the product.
@aspuzling
@aspuzling 2 роки тому
Could you explain? What does a an active probe do and why is it better?
@codingmarco
@codingmarco 2 роки тому
@@aspuzling You can learn more about active vs. passive probes from these two videos: ukposts.info/have/v-deo/m4hpjXuYrm-JxWQ.html and ukposts.info/have/v-deo/o5KjbY6we2enzas.html
@aspuzling
@aspuzling 2 роки тому
@@codingmarco Right so active probes can sample higher frequencies and provide a more accurate reading of the signal. But how would that have helped in this case? It seems he was able to measure the USB signal fine with passive probes.
@VytenisNarusis
@VytenisNarusis 2 роки тому
That's some dedication with the disassembly - if I had a Das Keyboard I would be afraid to look at it the wrong way. Great video!
@chrisvarns
@chrisvarns 2 роки тому
lol i just bought a das keyboard pro 4, do they have some reliability issues or something?
@wbfaulk
@wbfaulk 2 роки тому
It's nice that it's actually disassemblable, though. Just a few screws and it comes apart, instead of clips that break or, even worse, welded joints.
@oliverer3
@oliverer3 2 роки тому
@@chrisvarns not that I know of they are however quite expensive for a non custom keyboard.
@vikiai4241
@vikiai4241 2 роки тому
@@chrisvarns They have a very good reputation. I think Vytenis was just referring to how much they cost. (And the fact that DAS do actually use an in-keyboad hub that runs at USB HIghSpeed reflects this attention to quality. I'm constantly reminding students not to stick their USB drives in the in-keyboard ports on the Macs and Dells in our labs because those do only operate at FullSpeed mode, which is plenty for a keyboard, mouse, gamepad, etc., but makes file transfers somewhat slooooooow!) Note that, confusingly, USB HighSpeed is a lot faster than USB FullSpeed. The naming issue is because LowSpeed and FullSpeed were defined. in the USB 1 spec, then when USB2 was developed they needed a name for "faster than FullSpeed" (shoudda called it USB LudicrousSpeed, IMO!).
@daantimmer
@daantimmer 2 роки тому
I was holding my breath while he was taking that beautiful keyboard apart. I happen to own two of them (previous generation, I have a separate USB hub cable and USB keyboard cable). And mine doesn't support n-key via USB, it does support n-key via USB->PS2 converter though.
@theowinters6314
@theowinters6314 2 роки тому
It's not just kind of standard, it is a standard. The idea is that HID Parsing is expensive enough, you don't want to do it on boot, so boot HID devices (Keyboard and Mice) have a specific defined description so you could process it with the least amount of work. On the other hand, the NKey rollover HID will require some processing for each packet to translate the bits into something the computer understands. This can be slow with really complicated HID descriptors, though not so much as to be noticeable with today's machines. This is why some complex HID devices will have drivers even though they aren't strictly needed, as it allow them to skip the HID translation.
@Ashnurazg
@Ashnurazg 2 роки тому
At 27:45 the endpoint descriptor is different, the maximum packet size is 8 in 6KRO and 14 in NKRO that you missed to point out
@alexc4924
@alexc4924 2 роки тому
on the other hand, not very interesting. More bits take up more bytes, spooOOOoooOOOky!
@toddmarshall7573
@toddmarshall7573 2 роки тому
MIDI would be a neat walk in the park.
@Riboshom
@Riboshom 2 роки тому
MIDI is fine until you get to the control change signals, which were such a mess of under-specified signals and vendor-specific codes that MIDI2 threw up its arms and went "Screw it, that's all negociated between the host and device, now!". Although the MIDI1 protocol by itself is pretty simple, and the MIDI-USB encapsulation didn't seem to make it much more complex.
@toddmarshall7573
@toddmarshall7573 2 роки тому
@@Riboshom MIDI2 implementations in production now number 1 (according to my last count). Tools for rooting out and troubleshooting the behavior of MIDI2 will be very helpful. As I'm sure you know MIDI1 and MIDI2 do not coexist. 1 or 2 is the opening salvo of the conversation.
@Riboshom
@Riboshom 2 роки тому
@@toddmarshall7573 Yeah, MIDI2 won't be relevent for a while, if ever, (though hopefully it manages to get somewhere), and modern complex protocols have their own problems of bad implementations (like USB-C, especially power delivery), but whether or not that's preferable to an underspecified protocol like MIDI1... I guess your mileage may vary.
@CYXNIGHT
@CYXNIGHT 2 роки тому
It's always a good day when Ben releases a video!!
@MichaelFri
@MichaelFri 2 роки тому
N-key rollover was a thing before USB came out. IBM model F keyboards are one example and they got rid of the ghosting by eliminating the use of closing contacts altogether for capacitive switches. It'll be cool to cover how these keyboards work under the oscilloscope and how the PS/2 interface handles N-key rollover.
@kaitlyn__L
@kaitlyn__L Рік тому
PS/2 just blasts as many interrupts as keys pressed (and released), so it’s less interesting than this encoding change. Also the Model M since it went back to regular electrical contacts (on a membrane) for cost reduction after the Model F’s capacitive ones only has 2 key rollover! Which is a bit shonky, you’d think IBM could afford 104 diodes given all the steel in them. But I guess it _was_ the cost reduction design…
@jbrownson
@jbrownson 2 роки тому
Very interesting, would love to see something like this for wifi or Bluetooth, so curious why it takes so long for those things to connect
@bezimiennyziemniak
@bezimiennyziemniak 2 роки тому
It's funny because Bluetooth keyboards actually use the same data format with six bytes for keycodes taken directly from USB spec.
@khatharrmalkavian3306
@khatharrmalkavian3306 2 роки тому
Apart from the RF mumbo-jumbo and encryption, wifi is almost identical to ethernet. Back in the day we'd run coax cables from a hub and a row of computers would be connected to the same line using T-shaped connectors (one input from the cable, one output to the NIC, one output for another cable to go to the next PC). Ethernet is a broadcast format, so each device receiving a packet first checks the ethernet header to see if the destination MAC matches the local MAC. If not then the packet gets dropped without further inspection, unless you're in "promiscuous mode", which is used to inspect network traffic.
@Snaperkid
@Snaperkid 2 роки тому
@@khatharrmalkavian3306 wifi is a bit weirder, but it is still a wrapper for Ethernet frames. Wifi has a lot of fields that are parameters for the specific link. It also has a field for the access point you’re talking to as well as destination and source addresses.
@Ruhrpottpatriot
@Ruhrpottpatriot 2 роки тому
@@khatharrmalkavian3306 Naww, WiFi is pretty very different from Ethernet. Yes the data looks the same, because it actually is. TCP or UDP over IP have nothing to do with the underlying physical connection, where the difference actually is. You could write your own protocol to replace IP and neither Ethernet, nor WiFi would care.
@Ruhrpottpatriot
@Ruhrpottpatriot 2 роки тому
@@Snaperkid No, WiFi doesn't wrap Ethernet frames, it wraps IP frames (in the common usecase).
@Murtaskegg
@Murtaskegg 2 роки тому
I don't even know that a n-key rollover is, but I am intrigued!
@power-max
@power-max 2 роки тому
Yeah, it's a big deal for "pro gamers" and often a big marketing point for keyboards marketed to gamers.
@AlRoderick
@AlRoderick 2 роки тому
He used to hang out with Gilgamesh back in the day.
@NeatNit
@NeatNit 2 роки тому
To be honest I have no idea why it's called that, the name doesn't make any sense. But a keyboard is said to support n-key rollover (NKRO) if it correctly registers any number and any combination of keys pressed simultaneously.
@dovos8572
@dovos8572 2 роки тому
@@NeatNit n is the math variable for a number (without unit) and n-key rollover is the protocol for a roll over of n keys pressed. in this case n is 104, but for example products could have a bigger rollover like if you want to have a n-key roll over for music products with many slidern and keys. (idk if they use the same protocol)
@toddmarshall7573
@toddmarshall7573 2 роки тому
@@dovos8572 MIDI sure doesn't.
@64BitsFromHell
@64BitsFromHell 2 роки тому
Very cool to see the actual low-level stuff, and what exactly happens during the communication and such. Also, yeah I've had a few keyboards claiming N-key rollover, but crap themselves when certain specific combinations/number of keys are pressed. At least one of those did show up as two keyboards.
@supersonictumbleweed
@supersonictumbleweed 2 роки тому
I've also seen the "two virtual keyboards" approach. Looks like the manufacturers just didn't understand the USB spec and tried to be "clever"
@AluminumHaste
@AluminumHaste 2 роки тому
I used to have a keyboard the did "NKRO" over USB (this must have been close to 10 years ago now). It showed up in Device manager as 4 USB keyboards.
@mceajc
@mceajc 2 роки тому
Interesting? No - FASCINATING! Love the confidence to just "tap in" to something without breaking it.
@khatharrmalkavian3306
@khatharrmalkavian3306 2 роки тому
You'd have to get pretty lucky to "break" a chip when you're not driving current into it.
@ornessarhithfaeron3576
@ornessarhithfaeron3576 2 роки тому
@@khatharrmalkavian3306 "lucky"
@kaitlyn__L
@kaitlyn__L Рік тому
@@khatharrmalkavian3306 or incompetent with a soldering iron!
@XxtrashcanXx
@XxtrashcanXx 2 роки тому
Hey Ben, Great Video. My understanding is that a lot of older bios are incapable of communicating to a n-key rollover keyboard in this way and that is why you typically see the button to switch it on and off.
@Jamonpeligroso
@Jamonpeligroso 2 роки тому
"Well, this pcb doesnt have a normal usb 2 connector" Me: Oh darn, I wonder how he'll explain the theory with no hands-on visuals Ben: This man is on another level. Great stuff!
@vikiai4241
@vikiai4241 2 роки тому
He should release them on Wednesdays, so we can declare that day "Bensday"! (Reference to Isaac Arthur's Science and Futurism channel which often releases on what his fans call "Arthursday")
@metalpachuramon
@metalpachuramon 2 роки тому
Wow, that was such an awesome explanation, you can even see how Ben wrote down that communication transcript manually by the looks of some of the spaces between columns... that's pure dedication, bravo
@AlexYeryomin
@AlexYeryomin 2 роки тому
As usual, informative, interesting, easy to follow video. Thank you!
@DanCojocaru2000
@DanCojocaru2000 2 роки тому
Instant tap on the notification.
@huubhoogweg839
@huubhoogweg839 2 роки тому
I did that too
@willofirony
@willofirony 2 роки тому
Your hopes were fulfilled, Ben. I did find this riveting. I was reminded of the model 1 TRS80 (late 1970s) that had a memory mapped keyboard. The memory map was 8 X 7; the 8 columns addressed as 7 bytes. So, the driver software could be bypassed (or sub classed as we would say in Windows) . So, certain groups of keys could be accessed when pressed simultaneously. This allowed various utilities (from other vendors) to be activated. The favourite key groups were ASDF and HJKL, for obvious reasons. Such accessing of the keyboard was, of course, hacking. The DAS Keyboard was fortunate in being able to "sub class" an entire MCU rather than a bit of assembly code. The mind swims at the the possibilities that presents. Yet another awesome video, Ben.
@user-zi8jn1go8k
@user-zi8jn1go8k Рік тому
The reason for all the extra keys present in handshake could be just that the devs took some generic 'USB multimedia keys' library to use in the software and enabled it to use the buttons that are present physically but all possible buttons are still included in the description frame by default.
@guillermogarciamanjarrez8934
@guillermogarciamanjarrez8934 2 роки тому
This video is a work of art! Showing that engineering is not about black boxes that do stuff, but about Predictable and understandable things that you can research and understand how they work! Great job!! (Meanwhile I'm here trying to get a simple encoder to work 😅)
@cameronsteel6147
@cameronsteel6147 2 роки тому
These videos are so well put together. Amazing work Ben!
@GalacticRod
@GalacticRod 2 роки тому
Ben, your videos have inspired me so much. I love your teaching style and the way it allows me to learn these things. Last year I was hired as a teaching assistant for a class that teaches computer engineering fundamentals. While teaching my labs, I took inspiration from how you explain things from the ground up and it really helped me reach more students. It's an incredible feeling when they understand and learn the concepts that you teach them, and I want to thank you for helping me find that.
@MikeSims70
@MikeSims70 2 роки тому
Interesting video. I especially liked how you managed to keep the voice track synced with the events happening when you fast-forwarded the video. Very effective!
@etcavole
@etcavole 2 роки тому
Awesome video, this series is amazing ! Thank you Ben !
@gregorymccoy6797
@gregorymccoy6797 2 роки тому
That was entertaining and enlightening. Thanks so much. I hope you get to keep the scope!
@zenithparsec
@zenithparsec 2 роки тому
Many of my favorite electronic devices have similar wires hanging out of them... usually for similar reasons. It's amazing how many routers and 'home media devices' have unpopulated USB interfaces or just serial connections to let you do fun things.
@collinbardini
@collinbardini 2 роки тому
Wow this video is great. I remember trying to figure out how NKRO worked when making firmware for my keyboard, but couldn’t find any good resources. I’ll have to go back and give it a try now!
@alexc4924
@alexc4924 2 роки тому
IIRC the USB spec is actually pretty clear about this if you bother to read and understand it - it describes the different ways you can format your packets. One of them is to have 1 bit per button, and another way is to have space for a certain number of button codes.
@LordHonkInc
@LordHonkInc 2 роки тому
Regarding the end of the video: I can confirm at least for my Corsair K95 that it is listed in Windows Device Manager as several, separate HID keyboards while my handwired QMK driven keyboard isn't, so there's definitely more than one way to implement NKRO
@bltzcstrnx
@bltzcstrnx 2 роки тому
There are multiple ways, but only one way that is technically correct. I guess Corsair is just being lazy.
@pav418
@pav418 2 роки тому
34:50: maybe the keyboard supports macro/button customization and reports all these keys in case you decide to use them? Also, the other interfaces may be used by manufacturer's customization software... Anyway, great video as always 😊️
@jpdemer5
@jpdemer5 2 роки тому
They make a "Model S Pro" Das Keyboard for the Mac that has all of those function keys, to reproduce what an Apple keyboard can do.
@JaccovanSchaik
@JaccovanSchaik 2 роки тому
I have that exact same keyboard. But I've never opened it up, let alone soldered some wires to a freaking *SMD* resistor. You sir have mad skills.
@your_utube
@your_utube 2 роки тому
Expanding my knowledge the Ben Eater way is really amazing. I learned something today. Thanks Ben.
@mattsyme87
@mattsyme87 2 роки тому
Amazing description. Thank you so much for all the content you produce. It is really appreciated.
@NightmareQueenJune
@NightmareQueenJune 2 роки тому
I have two keyboards with N key rollover. The interesting thing is that they seem to handle it differently when actually typing text. With my current keyboard it registeres all the keypresses I make, but keeps typing only the last one if I keep them pressed (example: asdgoerfijjjjjjjjjjjjjjjj). My other keyboard actually loops through every key I press and repeats the pattern (example: naipntgrnaipntgrnaipntgrnaipntgrnaipntgr) Just thought that was pretty interesting.
@wbfaulk
@wbfaulk 2 роки тому
Hm. What is it that implements that repeat? Based on the protocol that he's shown us, it feels like it's the computer and not the keyboard. The fact that you can change repeat rates via the OS sort of supports that. I'm guessing that you're testing these two keyboards on the same computer, so it must be the keyboards that are different. I bet that the computer/OS just repeats the last key it saw from the keyboard, but one of your keyboards implements the multi-6KRO system he mentioned at the end and your computer is repeating the last key it saw from each of the keyboards.
@NightmareQueenJune
@NightmareQueenJune 2 роки тому
@@wbfaulk That's an interesting point. I am using Windows 10 with standard settings (I don't even know if there is a setting for such thing). If I find the motivation I will try to look at it using Wireshark which IIRC has a USB logging addon. I'll keep you updated.
@GrayBlood1331
@GrayBlood1331 2 роки тому
Holy crap, my keyboard does the second one! But the timing has to be extremely precise. For two keys it was around 50% success rate. only sometimes could I get a 3 key repeat and four key repeat is not common. I couldn't get 5 keys to repeat. maybe your current keyboard can do it but you need to keep trying.
@NightmareQueenJune
@NightmareQueenJune 2 роки тому
@@wbfaulk Okay, I figured out that both keyboards use interrupts as their way of communicating. They send nothing until the state of the keyboard changes. -Both use a slightly different kind of one bit per key communication. But this is not important.- _Edit: this is actually not true. The old keyboard uses the six key rollover until more than six keys are pressed. Then it switches to one bit per key mode. Very interesting behavior._ My current keyboard sends two interrupts no matter how simultaneously you press both keys (one with only one key down and one with both keys down) and likewise (two) with the upstroke. _Edit: this is also not true. with this keyboard it is also possible to get both actions into one single package, it is just much harder to get the timing right._ My other keyboard on the other hand only sends one interrupt if you press two (or more) keys fast enough (both keys down) and only one on the upstroke (no keys down). It only does that repeating pattern if you press the buttons simultaneously. If you first start pressing one button and then press another, it repeats just the last one. I hope my explanation was kind of understandable. Trying to explain this just by text is kind of difficult.
@NightmareQueenJune
@NightmareQueenJune 2 роки тому
@@GrayBlood1331 Well, I feel kind of betrayed. I tried at least a dozen times without any success before writing my comment. After reading yours I thought to myself "meh, let's try it again" and I got a loop of three the first time. With my other Keyboard it is not difficult to get a loop of ten. I guess it just comes to polling rate then.
@FrankGraffagnino
@FrankGraffagnino 2 роки тому
really appreciate all the work you put into videos like this... i'm sure it took a while to go through all of those USB reports and annotate everything. Thanks Ben!
@alexgravenor
@alexgravenor 2 роки тому
Learned a lot from this and previous videos. Thanks for helping me learn :)
@wcvp
@wcvp 2 роки тому
Thanks!
@wcvp
@wcvp 2 роки тому
Interesting that I can't edit that message...but whatever. I work in embedded electronics design and haven't done much other than include basic USB to UART chips, or use the vendor supplied USB drivers (for the microcontroller), so I never knew how any of this works since I didn't need to. This and the other videos in the series have been amazing.
@sleep8765
@sleep8765 2 роки тому
Love these videos. They have taught me so much. Keep it up!
@nax1807
@nax1807 2 роки тому
these videos have a certain asmr quality about them i love it.
@doctorbobstone
@doctorbobstone 2 роки тому
That would be "Awesome Serial Mechanism Reveal," right? 😀
@DerrickJolicoeur
@DerrickJolicoeur 2 роки тому
Nice, thanks for opening your DAS Keyboard for us! You made short work of that handshake
@techrev9999
@techrev9999 2 роки тому
That totally went in a direction I wasn't expecting, and I feel like I learned too much from this video. LOL. It's awesome.
@rager1969
@rager1969 2 роки тому
I wasn't sure if I was going to like/be interested in this video, but I kept watching because Ben hasn't steered me wrong before. I'm glad I did. Great job, Ben!
@okiedokie9430
@okiedokie9430 2 роки тому
The three things i could watch forever are: the fire burning, the water flowing and Ben Eater speaking about digital electronics. Wow, man, thank you!!! 😊👍
@ucantSQ
@ucantSQ 2 роки тому
Ben Eater is the most inspiring tech youtuber. Whether he's tapping into a usb hub controller chip, or programing an EEPROM by hand, he makes this stuff seem so accessible.
@GeorgeTsiros
@GeorgeTsiros 2 роки тому
Nice guide! Thank you!
@nonchip
@nonchip 2 роки тому
note those 2 resistors are not just impedance matching but also just to limit current in case both ICs happen to drive the bus at the same time. you see them often when usb is used inter-chip, and i guess with longer wires they just rely on the wire resistance to do that job :P
@vmiguel1988
@vmiguel1988 2 роки тому
Is used to control ringing actually
@nonchip
@nonchip 2 роки тому
@@vmiguel1988 oh yeah that's probably gonna be more important than shorts through the (hopefully) protected pins at those frequencies. tbh i was surprised how far they snake those traces back and forth :D
@vmiguel1988
@vmiguel1988 2 роки тому
@@nonchip Not a problem as long as the traces impedance matching is considered.
@christopherweeks89
@christopherweeks89 2 роки тому
This series just keeps getting better
@FredericSegard
@FredericSegard 2 роки тому
Good series on USB keyboards. Quick note and request: I wish that you would continue with the 6502 series.
@kellyfrench
@kellyfrench 2 роки тому
I’m sure there is a connection, my guess is if you wanted to add a keyboard to the 6502 you wouldn’t want people to hunt for an old non-USB keyboard.
@HrHaakon
@HrHaakon Рік тому
​@@kellyfrench A PS/2 adapter costs like 7 dollars, but I'm unsure how good they are.
@kaitlyn__L
@kaitlyn__L Рік тому
@@HrHaakon they’re passive and require the keyboard controller understands what to do when the relevant (unused otherwise) pin is shorted when connected. Keyboard controllers by and large stopped doing this around 2005-10, so modern commodity USB keyboards can’t use the adapter.
@PelDaddy
@PelDaddy 2 роки тому
Interesting exploration. Thanks for sharing.
@berithpy
@berithpy 2 роки тому
You are a great communicator Ben! This video helped me understand USB in a way I never understood it before
@Krmpfpks
@Krmpfpks 2 роки тому
Very interesting and well done video. Thank you.
@vishnunair3805
@vishnunair3805 2 роки тому
This channel is the best I have discovered on youtube in a long while.
@kf5tqnkf5tqn36
@kf5tqnkf5tqn36 2 роки тому
+ 1 for fixing it in post!
@alexisraels1437
@alexisraels1437 2 роки тому
Anyone else ever notice that Ben Eater is just Be nEater. Thanks for living up to your name with how clean your videos and breadboard circuits are.
@prow7
@prow7 2 роки тому
Another fantastic video! I wish more keyboards included a dedicated calculator button... I had no idea that key is included in the spec.
@EaglesFlight75
@EaglesFlight75 2 роки тому
You have done so much to inspire and teach me to learn how circuits and electronics work, I hate to ask anything, but would you be willing to do a video on the required and best features of the oscilloscope you use and what you might recommend for someone just getting started? If you already have one, I'm just not finding it. Thanks for all you do!
@WolfNinja13
@WolfNinja13 2 роки тому
This is really educational :) Thank you for these awsome videos
@zombie.gaming
@zombie.gaming 2 роки тому
Great educational video as always!
@yuhanna_kapali
@yuhanna_kapali 2 роки тому
loving this series.
@brigittelpb9269
@brigittelpb9269 2 роки тому
thx a lot, we learn so much with your videos
@gabinblot1817
@gabinblot1817 2 роки тому
Nice video, very educative for USB newbies!
@ericwalls7717
@ericwalls7717 2 роки тому
Love you, love your show! Crazy concept, handmade 8 × 8 multiplexed capacitive sensor grid, foil strips and breadboard!?! Variable LED intensity determined by proximity....just imagineering... Thanks for all you've shared!
@Joeyjoejoe1708
@Joeyjoejoe1708 2 роки тому
This series is out of this world quality-wise. Absolutley interesting.
@tmhchacham
@tmhchacham 2 роки тому
This is ridiculously fascinating. And i love how you are not phased by another chip...just get the spec sheet and solder away. Amazing video! Thank you!
@tommytomtomtomestini3894
@tommytomtomtomestini3894 2 роки тому
I've had the Das Keyboard Pro for a few months now.... Did not know about the sleep/suspend/resume button lol... Thanks Ben :D
@saddle1940
@saddle1940 Рік тому
Thankyou, that was very informative.
@Gengh13
@Gengh13 2 роки тому
Thanks for this awesome explanation.
@mad_bad_cat
@mad_bad_cat 2 роки тому
Keysight should just let you have that oscilloscope (instead of loaning as you mentioned before) since you are one of the few people who actually use it properly to its limits! Brilliant video!
@toseltreps1101
@toseltreps1101 Рік тому
this is the most laid-back electronics teaching channel i have come across. food for natural curiosity, i love it!
@Trenjeska
@Trenjeska 2 роки тому
this is really interesting, thank you!
@SimonBuchanNz
@SimonBuchanNz 2 роки тому
Like many keyboards, the Das keyboards have a Fn key that switches the F1-12 keys. That's probably covering the majority of the reported range of system control keys.
@qwertquadrat
@qwertquadrat 2 роки тому
Great video! Two notes: 24:17 The format here is just "little endian", bytes are just backwards. Generally: What is done in this video with the very beautiful way via the oscilloscope can also be done at home without soldering or expensive (but cool) hardware, just using software on the connected computer - searching for how to capture USB packets with the free software Wireshark would be a start for that rabbit hole.
@NateCrownwell
@NateCrownwell 2 роки тому
super cool, thank you Ben :)
@Zondac
@Zondac 2 роки тому
AHH, the das keyboard. My favorite keyboard, got it a few years ago and it's wonderful to use. Got really excited when I saw it in this video
@lordicemaniac
@lordicemaniac 2 роки тому
fascinating, i haven't did this kind of discovering since i was in high school playing with DOS interrupts, writing into VGA memory and tinkering with data from DIN connectored keyboard at that time... now i feel so old :D
@tubedejay
@tubedejay 2 роки тому
Excellent, a superb lesson.
@buidelrat132
@buidelrat132 2 роки тому
Super great, thank you!
@gabrielgonzalez1998
@gabrielgonzalez1998 2 роки тому
Great video. Thank you.
@jamalmulla1071
@jamalmulla1071 2 роки тому
I love the janky wiring you did on the PCB. That was cool
@wbfaulk
@wbfaulk 2 роки тому
It's less janky than having a permanent cable hot-glued into a port instead of soldered on.
@jamalmulla1071
@jamalmulla1071 2 роки тому
@@wbfaulk lol yeah that's true.
@vikiai4241
@vikiai4241 2 роки тому
@@wbfaulk To be fair, that does make it rather easy to swap out a dud cable if you ever need to.
@tompov227
@tompov227 2 роки тому
VERY happy to see a keyboard series with a mechanical keyboard in it. tho i do use that same dell keyboard at work so lol
@kennedyplan7414
@kennedyplan7414 2 роки тому
Hi sir, I really appreciate your channel and learning always a lot. Thank you very much, sir!
@deviljelly3
@deviljelly3 2 роки тому
Jeez Ben... that's one hell of a scope....
@artursmihelsons415
@artursmihelsons415 2 роки тому
Great video, as always! 👍 Thanks! When I saw first closeup of keyboard chip, I momentarily noticed these two 33R resistors and my only thought was - looks like USB data line.. 😂 Great thing, that this keyboard didn't have inside blobs of epoxy coated crystals but had normal chips..
@Nomnivore7531
@Nomnivore7531 2 роки тому
I met the guys who manufacture the Das keyboard when I was in highschool some 8 years ago. I remember they mentioned something about the keyboards not being able to start up in n-key rollover so you had to activate it manually
@DavidDubrovic
@DavidDubrovic 2 роки тому
keyboards have to support "keyboard boot protocol" that has this hard-coded protocol (6KRO), so that BIOS and legacy software can work, but it seems manufacturers at the time forgot that you can just switch to full HID support after booting, and so "USB does not do NKRO" thing was born
@KirstyTube
@KirstyTube 2 роки тому
Awesome video. I made a small keyboard with an Arduino Nano for my youngest (12 going on 25) to play OVI / music beats game or something similar. So much faster than a membrane keyboard as we used 'real' cherry MX mechanical switches. Nowhere near your level obviously but this is still very interesting and useful / the source code for the library and demo code made a bit more sense lol Thanks again :)
@antonhoawoad7515
@antonhoawoad7515 2 роки тому
It would be very interesting if you could look at a dmx signal next or maybe even build your own dmx controller on a breadboard
@xaytana
@xaytana Рік тому
You should definitely do a follow-up video on this covering USB HID usage tables. Out of curiosity I was looking at what came after the F13-F24 cluster, and I ended up with a document that covers usage tables, describing usages beyond just keyboards. Pointers, mice, joysticks, gamepads, VR, individual tables for the six cartesian translation and rotation axes, sliders, dials, etc., even vector usage, and not to mention different switch types. I never realized HID covered so much when it seems like everything requires specific manufacturer drivers when things like keyboards are pretty generic devices.
@mmk34
@mmk34 2 роки тому
Fantastic bit of engineering, love your videos.
How does a USB keyboard work?
34:15
Ben Eater
Переглядів 3,1 млн
A simple BIOS for my breadboard computer
21:53
Ben Eater
Переглядів 316 тис.
Підставка для яєць
00:37
Afinka
Переглядів 102 тис.
Кровосток - разговор с легендами / вДудь
2:12:57
So how does a PS/2 keyboard interface work?
33:07
Ben Eater
Переглядів 477 тис.
We should use this amazing mechanism that's inside a grasshopper leg
19:19
Explaining PCIe Slots
11:10
ExplainingComputers
Переглядів 1,9 млн
The world's worst video card?
32:47
Ben Eater
Переглядів 6 млн
Detecting FAKE Chips From China 🔍
29:24
Noel's Retro Lab
Переглядів 436 тис.
Why build an entire computer on breadboards?
28:43
Ben Eater
Переглядів 3,1 млн
Model M keyboard from 1986. I got it working on my modern PC!
24:14
Veronica Explains
Переглядів 53 тис.
How do Computer Keyboards Work? 🤔⌨⌨🛠
11:09
Branch Education
Переглядів 1 млн
Hacking a weird TV censoring device
20:59
Ben Eater
Переглядів 2,9 млн
Can this sad broken C64 be saved?
41:49
Adrian's Digital Basement
Переглядів 547 тис.
Підставка для яєць
00:37
Afinka
Переглядів 102 тис.