How does n-key rollover work?

  Рет қаралды 237,579

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
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
@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!
@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!
@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.
@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"
@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
@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.
@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.
@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!
@thewhitefalcon8539
@thewhitefalcon8539 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 жыл бұрын
@@thewhitefalcon8539 That's possible. I don't know anything about that.
@bltzcstrnx
@bltzcstrnx 4 ай бұрын
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.
@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
@thewhitefalcon8539
@thewhitefalcon8539 2 жыл бұрын
on the other hand, not very interesting. More bits take up more bytes, spooOOOoooOOOky!
@CYXNIGHT
@CYXNIGHT 2 жыл бұрын
It's always a good day when Ben releases a video!!
@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
@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: kzfaq.info/get/bejne/mb5ojKiS3J-8lGQ.html and kzfaq.info/get/bejne/ociibLuqqZfanKs.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.
@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.
@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.
@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…
@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.
@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).
@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 😅)
@AlexYeryomin
@AlexYeryomin 2 жыл бұрын
As usual, informative, interesting, easy to follow video. Thank you!
@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!
@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")
@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.
@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!
@thewhitefalcon8539
@thewhitefalcon8539 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.
@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.
@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!
@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.
@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.
@cameronsteel6147
@cameronsteel6147 2 жыл бұрын
These videos are so well put together. Amazing work Ben!
@gregorymccoy6797
@gregorymccoy6797 2 жыл бұрын
That was entertaining and enlightening. Thanks so much. I hope you get to keep the scope!
@alexgravenor
@alexgravenor 2 жыл бұрын
Learned a lot from this and previous videos. Thanks for helping me learn :)
@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.
@etcavole
@etcavole 2 жыл бұрын
Awesome video, this series is amazing ! Thank you Ben !
@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.
@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!
@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.
@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.
@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.
@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!
@PelDaddy
@PelDaddy 2 жыл бұрын
Interesting exploration. Thanks for sharing.
@sleep8765
@sleep8765 2 жыл бұрын
Love these videos. They have taught me so much. Keep it up!
@DerrickJolicoeur
@DerrickJolicoeur 2 жыл бұрын
Nice, thanks for opening your DAS Keyboard for us! You made short work of that handshake
@GeorgeTsiros
@GeorgeTsiros 2 жыл бұрын
Nice guide! Thank you!
@Krmpfpks
@Krmpfpks 2 жыл бұрын
Very interesting and well done video. Thank you.
@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.
@DanCojocaru2000
@DanCojocaru2000 2 жыл бұрын
Instant tap on the notification.
@huubhoogweg839
@huubhoogweg839 2 жыл бұрын
I did that too
@brigittelpb9269
@brigittelpb9269 2 жыл бұрын
thx a lot, we learn so much with your videos
@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.
@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.
@zombie.gaming
@zombie.gaming 2 жыл бұрын
Great educational video as always!
@berithpy
@berithpy 2 жыл бұрын
You are a great communicator Ben! This video helped me understand USB in a way I never understood it before
@vishnunair3805
@vishnunair3805 2 жыл бұрын
This channel is the best I have discovered on youtube in a long while.
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.
@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.
@christopherweeks89
@christopherweeks89 2 жыл бұрын
This series just keeps getting better
@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!
@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!
@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? 😀
@WolfNinja13
@WolfNinja13 2 жыл бұрын
This is really educational :) Thank you for these awsome videos
@gabinblot1817
@gabinblot1817 2 жыл бұрын
Nice video, very educative for USB newbies!
@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..
@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.
@wbfaulk
@wbfaulk 2 жыл бұрын
I guess you probably didn't have one around, but you could have plugged the keyboard's cable into a USB1.1 hub and it wouldn't have been able to negotiate the 480Mbps communication and (hopefully) fallen back to 12Mbps (or even 1.5Mbps).
@MatthijsvanDuin
@MatthijsvanDuin 2 жыл бұрын
yep it would have reverted to 12Mbps
@bltzcstrnx
@bltzcstrnx 2 жыл бұрын
It's really hard nowadays to find USB hub that is lower than version 2.
@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
@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.
@yuhanna_kapali
@yuhanna_kapali 2 жыл бұрын
loving this series.
@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
@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.
@toseltreps1101
@toseltreps1101 Жыл бұрын
this is the most laid-back electronics teaching channel i have come across. food for natural curiosity, i love it!
@saddle1940
@saddle1940 2 жыл бұрын
Thankyou, that was very informative.
@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!
@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
@Gengh13
@Gengh13 2 жыл бұрын
Thanks for this awesome explanation.
@tubedejay
@tubedejay 2 жыл бұрын
Excellent, a superb lesson.
@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.
@gabrielgonzalez1998
@gabrielgonzalez1998 2 жыл бұрын
Great video. Thank you.
@kf5tqnkf5tqn36
@kf5tqnkf5tqn36 2 жыл бұрын
+ 1 for fixing it in post!
@buidelrat132
@buidelrat132 2 жыл бұрын
Super great, 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.
@NateCrownwell
@NateCrownwell 2 жыл бұрын
super cool, thank you Ben :)
@kennedyplan7414
@kennedyplan7414 2 жыл бұрын
Hi sir, I really appreciate your channel and learning always a lot. Thank you very much, sir!
@XenHat
@XenHat 2 жыл бұрын
Another Ben Eater video! Early Xmas! -- I've always been curious about n-key RollOver, and why MFG always "cheaps out" on it.
@lis6502
@lis6502 2 жыл бұрын
i love how deep Ben goes in his videos. "so we have this keyboard here. oh, it's wired to internal hub? hold my beer, i am gonna tap into this communication" :D. Even knowing everything that you are doing it's just amusing to see it's getting done eventually :)
@merseyviking
@merseyviking 2 жыл бұрын
That was really interesting because I have the same keyboard (MX Brown switches, and custom side-printed keycaps), and I have pondered cracking it open. I can highly recommend it BTW, it has a good amount of gravity in it, and although I thought the volume wheel was a gimmick, I use it all the time now.
@HrHaakon
@HrHaakon Жыл бұрын
The real gimmick is the ruler attached beneath it, but it's fine. :D
@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
@Trenjeska
@Trenjeska 2 жыл бұрын
this is really interesting, thank you!
@deviljelly3
@deviljelly3 2 жыл бұрын
Jeez Ben... that's one hell of a scope....
@IronRiviera
@IronRiviera 2 жыл бұрын
Very interesting Ben,. Thank you
@GameBacardi
@GameBacardi 2 жыл бұрын
Good video, I like it! No slow motion 360 zoom effects, background music or REPLAY x3 shots of something.
Let's build a voltage multiplier!
16:32
Ben Eater
Рет қаралды 1,9 МЛН
Photoelectric light controls are weirder than they seem
19:20
Technology Connections
Рет қаралды 927 М.
How does a USB keyboard work?
34:15
Ben Eater
Рет қаралды 3,2 МЛН
World's worst video card gets better?
44:25
Ben Eater
Рет қаралды 812 М.
Reliable data transmission
43:54
Ben Eater
Рет қаралды 1,6 МЛН
So how does a PS/2 keyboard interface work?
33:07
Ben Eater
Рет қаралды 481 М.
Detecting FAKE Chips From China 🔍
29:24
Noel's Retro Lab
Рет қаралды 437 М.
How Machine Language Works
19:48
The 8-Bit Guy
Рет қаралды 940 М.
How do Computer Keyboards Work? 🤔⌨⌨🛠
11:09
Branch Education
Рет қаралды 1,1 МЛН
Hardware interrupts
27:36
Ben Eater
Рет қаралды 588 М.
I Made a Neural Network with just Redstone!
17:23
mattbatwings
Рет қаралды 577 М.