How does n-key rollover work?

preview_player
Показать описание

------------------

Social media:

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
Рекомендации по теме
Комментарии
Автор

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.

Автор

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

mightythimble
Автор

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!

zolan
Автор

Came for n key rollover, got a whole USB keyboard masterclass for dummies

Otakutaru
Автор

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

AvenDonn
Автор

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.

lefteriseleftheriades
Автор

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.

ifohancroft
Автор

Louis Rossman probably freaking out at how little Flux was used

UCmiwlBlRthCtZEojtg
Автор

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.

ruuneney
Автор

Time to learn about another aspect of computer hardware I've never heard or thought of!

NickiRusin
Автор

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.

theowinters
Автор

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.

OntologicalQuandry
Автор

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

Ashnurazg
Автор

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.

willofirony
Автор

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.

XxtrashcanXx
Автор

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

metalpachuramon
Автор

Doesn't matter how long his video are I never get bored.❤️❤️

rupeshnikale
Автор

Damn if only i had a professsor like him during my engineering this man is just awesome 🤓🤓

rachelteller
Автор

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.

MichaelFri
Автор

It's always a good day when Ben releases a video!!

CYXNIGHT