How does n-key rollover work?

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

This was incredibly fascinating thank you for posting it. I loved the way he explains everything and goes into fully decoding the usb data stream. Was going to watch for 2 minutes and stayed for 37.

πŸ‘οΈŽ︎ 2 πŸ‘€οΈŽ︎ u/crazyant415 πŸ“…οΈŽ︎ Aug 01 2021 πŸ—«︎ replies
Captions
so i've got this oscilloscope hooked up to this cheap usb keyboard capturing and decoding the data packets from it and we're getting these eight byte data packets that describe what keys are being pressed the first byte is encoding the uh modifier keys control shift alt that sort of thing and then the second byte is actually not used which leaves six bytes remaining for any other keys that happen to be pressed and that you know is a limitation that you can only report up to six simultaneous key presses and that limitation of only being able to report six simultaneous key presses is called six key rollover and that's actually pretty standard for communication with usb keyboards though in a previous video i walked through the entire plug and play negotiation with this particular keyboard and we saw that during that negotiation it described the format of this data packet and you can see here it's saying that it's reporting six keys so at least in theory it seems like it would be possible for a keyboard to potentially report more than six simultaneous keys being pressed but even so this particular keyboard actually isn't even a six key rollover keyboard look for example if i press o you'll see you know the key code for o is 12 that shows up there if i then also press p you'll see 12 and 13 for both of those but now look what happens if i try to also simultaneously press l all of a sudden i don't get the 12 and 13 anymore i get all ones and that's just indicating an error condition the keyboard doesn't know what to do with me pressing these three keys l o and p so at least for those three keys the keyboard was only going to register two of them at the same time so this keyboard is actually only a two key rollover keyboard and what's going on with that has to do with how the keyboard is wired internally because internally there's this matrix that define each key so there's sort of you know rows and columns and the keyboard is in trying to figure out which keys are being pressed it's going to kind of scan along each column and and each row so what it'll do is it'll put you know some current for example into column one here and it'll see which rows it comes out so for example if we're pressing this key right here the keyboard is going to scan it's going to put some current into row one well none of these keys are being pressed so that current's not going to come out any of these rows here so then it's going to move on it's going to put some current into row 2. and it's not going to come out a but it is going to come out b so we put current into into 2 it's going to come out b so the keyboard is going to notice like okay so 2 b that key there must be pressed but nothing coming out 2c this is not connected so then it moves on to 3 nothing at 3a 3b 3c moves on to 4 and it keeps scanning like that and the keyboard is just going to continually scan the rows and columns like that you know many many times per second so as soon as you press a key it's able to detect that so in this case when we're pressing you know that key that's located at that 2b position it's able to detect that now let's say we happen to press 2ks at the same time well that also works right because if we put current into column one here it's not going to come out a b or c but if we put current into column two it is going to come out row b so we we're again detecting that key2b is is pressed because that current is going to flow that way and then when it scans over to column three uh it's going to see the current it's not going to come out a or b but it is going to come out c so it's going to detect that 2c is also pressed or excuse me 3c the 3c is pressed and then it's going to move on to 4 and that's not connected to anything it's not pressing any of those keys and so in this case the keyboard is going to properly detect that 2b and 3c are the two keys that are being pressed now what happens if we press a third key so at this point it's going to do the same thing it's going to scan across so it's going to say okay if i put some current into into column 1 here that doesn't come out a b or c if i put some current into column 2 here well it's going to come out b as you would expect so 2b must be pressed but that current is also going to flow you know because this is connected here and this is connected it's also going to flow down here because this is connected to c so it's going to say oh well 2c is also pressed which of course you can see 2c is not pressed but because these three points are connected we're pressing those three keys it's going to falsely detect that 2c must be pressed as well and then it's going to keep scanning so 3 it's going to put some current in there it's going to see that 3 is connected to b so 3 b it's going to also see that 3 is connected to c so 3c and then it's going to move on to 4. 4 is not connected to a b or c so it doesn't detect any of that so in this case we're pressing these three keys but the scanning algorithm and just the way that this hardware is set up detects that we're pressing 2b 2c 3b and 3c so it actually thinks we're pressing this fourth key over here that we're not pressing and this is a phenomenon that is referred to as ghosting and what will happen with a keyboard that is set up like this is the keyboard is going to have you know some little bit of intelligence to detect that this might be going on so if the keyboard detects that you know these four keys are pressed the keyboard's smart enough to know that well if i detect that those four keys are pressed i really don't know if it's actually those four keys or if it's maybe three of them and then if it's three of them i don't know which three so then the keyboard is going to say nope that's an error and that's where we would see it report that error like this where just sort of essentially when we press that third key kind of throws up its hands and says nope i don't i don't really know what you're doing so i'm just going to report an error that way the computer doesn't you know register a key press that you didn't actually press it just doesn't register a key press that you did press which i guess is sort of in that situation the the better scenario so how do you work around this well the way to work around it is that when you press a key rather than simply connecting those two parts of the matrix what it would do is put a diode into the circuit like that so the key every key is actually associated with a diode so in this case again if you're putting current into column two it's going to flow through this diode and come out row b over here so 2b no problem detecting that and same thing here if we press this key down here as well and pressing that key adds a diode to that circuit there then you know putting current in 2 it's only going to come out b no problem so we detect 2b is pressed putting current into 3 here that's going to flow through this diode it's going to come out c and so we're going to detect that 2c is also pressed but then in that scenario where we press the third key if that also essentially just adds a diode to the circuit like that well we can scan that as well right because you know obviously one is not connected to anything when we put current into into row 2 here it's going to flow through this diode in one direction come out b so we detect that 2b is pressed but once it's on this uh this b rho it's not going to flow backwards through this diode because that's what a diode does diode only allows current to flow one way so that's it current goes into it comes out b that's it so that's gonna move on to to column three here and so when it puts current into column three that's going to flow through this diode and come out row b no problem there so it's gonna detect that three b is being pressed and it's also going to go through this diode and come out row c so it's going to detect that 3c is also pressed and that's it because the current can't flow backwards through any of these diodes we're not going to get that ghosting situation so if it's as simple as just adding diodes like this to each of the keys you know why don't uh you know why why wouldn't this keyboard do that and the answer honestly is that well diodes cost money and even though there may be only a half a cent each with about 100 keys on this keyboard that's you know 50 cents added cost to producing this keyboard and uh you know the manufacturer just said not worth it but i've got a different keyboard here that does support n key rollover and so i'm curious to see how it works and one thing that's kind of interesting here is on the back of this keyboard it says that you can actually turn n key rollover on or off so if you press shift and then the mute button there's i guess there's an led that'll blink once if n key rollover is turned on and then twice if it's turned off so it'd be interesting to see what that does exactly if you press shift and then i guess this button here will turn it on and off let's take a look at how this works well unfortunately it doesn't look like i'm able to capture the data coming out of this keyboard because when i first plug it in like this what happens is it goes through the normal negotiation where d minus is low and d plus is high and that signals that this is going to be a full speed communication but then as soon as it starts communicating you get this kind of weird um lower voltage oscillation here and what's going on with that is that one of the things that a full speed device can do is that it can go through this high speed handshake and actually bump the speed up to to high speed so so low speed is 1.5 megabits per second full speed is 12 megabits per second and we've been able to capture that just fine here but then high speed is 480 megabits per second that's quite a bit faster and sort of out of the range of what this oscilloscope can capture and so that's what's happening here is it's going through this um this chirp process uh so you know it talks about an alternating sequence of chirp k and chirp j and if you look at the voltage specs here uh chirp j and trip k levels are this you know 700 to 1100 millivolts or negative 900 negative 500 millivolts and so that's sort of what's going on here is it's oscillating between those lower voltage to signal that it wants to operate at high speed and it seems kind of strange that a keyboard would need to operate at megabits per second you'd think 12 megabits per second would be more than enough but what is really happening here is this keyboard is more than just a keyboard it's got a usb hub in here and in fact it's a usb 3 hub although it is operating at usb 2 because i'm plugging it into a usb2 port on the computer but even still it's going to try to negotiate as fast as it can up to 480 megabits per second for usb2 so that if i plugged any devices into the hub ports on this keyboard they would be able to operate at at high speed and so really this keyboard is more than just a keyboard it's a keyboard and a usb hub and so actually if we do a ls usb t to see sort of a tree view of the usb devices we can see the keyboard here is actually operating at 12 megabits per second so the keyboard itself is full speed but then what this is showing is it's showing that the keyboard is plugged into a usb 2 hub that's operating at 480 megabits per second and then that of course is plugged into the the computer and it's kind of interesting here it says it's plugged into a usb 3 bus but the the actual physical port on the computer is 2.0 which is why it's negotiating at 2.0 here but in any event what we're seeing here is we're seeing that the hub is is what's operating at 480 megabits per second the keyboard if we could somehow uh intercept this connection between the keyboard and the hub the keyboard is actually talking at 12 megabits per second unfortunately though the only external connection here is the the one cable coming out of the keyboard which is the really the cable for the hub but what we could do is take the keyboard apart and see if maybe just just maybe there might be somewhere inside the keyboard where we can find those two sort of logical components are connected so let me go ahead and pull a bunch of screws out of this and see if we can open this up and and see what we get all right so this is interesting we've got a little circuit board here let's see here we go we can kind of sort of attached here let's see if i can detach this there we go so that's kind of coming apart get these screws out of the way and i've got a little circuit board here and this looks like it's probably the circuit board for the usb hub at least because you've got the you know cable coming in from the computer and you've got your usb ports here what i was hoping to see is i was hoping to see a connection in here that looked more like a you know sort of a usb 2 connection we have this little ribbon cable that goes into the keyboard but just looking at this it's got way more connectors on it than you would need for just a standard full speed usb 2 connection so i'm guessing that whatever protocol is is going across this cable it's not usb 2. let me pull this board out and take a closer look maybe we can learn some more one more screw here there we go does this come off yes so that's the circuit board it's kind of interesting that it actually uses this looks like just a standard usb 3 connector they've just kind of got it hot glued on there it's kind of interesting and then there's this ribbon cable that goes to the keyboard you can disconnect that just to get a better look at the board and let me kind of pull some of this other stuff out of the way here and here we can get a better look at it and what i what i'm noticing is there's a couple actually there's really two big chips there's one here it's got lots of pins and then there's one over here kind of underneath actually get this knob out of the way there's this other chip here that's got a bunch of pins and that kind of makes sense i would expect there to be two i mean there's sort of two functions on here we're expecting we're expecting a usb hub as well as whatever's driving the keyboard so let's take a closer look at what what these chips are so we've got one chip here on the front which says it's a vl812-q7 so vl812-q7 is a super speed usb 3.0 hub controller so that makes sense so that's our solution your success all right so this i mean that looks like the chip and they're showing it here in an application where it's a usb 3 hub so presumably that chip is driving the hub and here's a little block diagram of it so it looks like it's got a port 0 coming in here and then it gives you 4 ports going out and these are usb3 so you've got in addition to the d plus and d minus pins that you'd have for usb2 you've also got this tx plus tx minus rx plus rx minus so that's a usb 3 thing so that's this chip right here and then we've got another chip over on the other side and that looks like a nuvoton nuc nuc123 sd 4 bnc it's more of an eye test than anything and let's see what that is okay here we are it looks like a microcontroller unit 32-bit 64k of flash um so this looks like a microcontroller of some sort which is kind of what i'd expect we've got one chip that is a usb hub controller and the other is just a microcontroller that presumably is programmed by the manufacturer with keyboard functionality so this chip's controlling the keyboard and then this chip is running the usb hub and if we actually look at the traces here that kind of makes sense right because we've got this chip here that's our usb hub controller and you can see all the traces going off to the usb ports here we've got these two usb ports and we would expect to see um actually three pairs because these are usb 3. so there's the d plus d minus and then the tx plus and minus and rx plus and minus for for one port and then there's those same three for the next port so that makes sense um and then you see it looks like the same thing coming in so this is the input you know where we where you plug it into the computer and those are exposed here and you can see there's all these traces that are coming around going into this hub chip so you've got coming in from the computer into the hub chip and then you've got those two ports there now what we're looking for is if we want to intercept that just sort of usb 2 connection from this hub chip to the chip that's that's operating the keyboard we should be able to find hopefully somewhere in here the traces that go from this to this and so what it looks like is you can actually see there's four pairs of traces coming out here and going down over to the input here but really i would expect only three of those to actually go to that input and it looks like you've got this sort of turn it this way this bottom trace here goes down that goes underneath so let's see where that goes that comes out here and it looks like that does go to the input okay so that's one of them this next one this next pair comes down and that appears again to go to that input and then this third set here also comes down and that goes it looks like through these two capacitors so sort of capacitive coupling there and that also appears to go to this input so those are those would be the three pairs that go to the input so maybe this this fourth pair let's see where that goes that comes around and that goes under the board and pops out right here and that appears to go through these two resistors and into the microcontroller for the keyboard so that would be my guess as to where the connection between the keyboard and this usb hub controller is and in fact as a way to confirm that we can look at the actual pin that's the the two pins that it's using here it looks like it's the not the rightmost two but the the next pair in this those two pins there to the right with the sort of orientation dot in the lower left corner here so if we look at the pin out for this with orientation dot in the lower left corner and look at what those two pins are let's take a look at that on the data sheet let's see this doesn't have pin numbers i think i sound a datasheet here we go datasheet here we go here's a pin out so the orientation dot here in the lower left and we're looking at these two pins here and i believe that's usb p4 so port 4 plus and minus so that that makes a lot of sense so we've got the usb 0 so the input plus and minus and then rx and tx plus and minus over here so those are the three traces we are the three pairs of traces we saw going in from the the input and then this over here is port four and then over here we've got ports one and two and those are the ones going out to these two ports here so that all makes a lot of sense that that this pair on the left here would be the usb 2 connection from the hub for the keyboard and so again if we follow those traces they come down here to these two little vias which go over to the other side of the board and if we follow that over to the other side of the board they pop out here and they appear to go through these two resistors and into this microcontroller for the keyboard and i'm guessing these resistors are just for some impedance matching or something like that but what we can do is we can actually try to solder on some wires to these two uh basically to these two connections here that we can then use to hook the oscilloscope up to to try to see if we can tap into and monitor this usb link so i don't think it matters too much which side of these resistors we solder onto here since there's i wouldn't imagine there's too much current flowing through here so the voltage drop across the resistor isn't going to be all that significant i'll start by adding a little solder here onto these resistors and that should be enough to just tack these wires on let me go this way let's see if i can get this to stick i might need a little flux to help this out yeah this is not the greatest connection and secret to good solder connection is lots of flux so let me see if i can improve this here and basically what flux does is it just cleans any oxidation or anything off of the wire contacts or whatever so that the solder is more likely to stick to it and it really does work wonders that looks a lot better and then i can clean up some of that flux here with some alcohol but that looks pretty good this seems strong enough but it appears to be attached and uh not shorting anything that's the most important part all right so let's reassemble this and see if we can uh hook the oscilloscope up and capture anything interesting on those on those wires we just attached so start by hooking the keyboard back up through this ribbon cable i believe it goes like that and then this goes back down like that something like that but i won't get it all screwed together just yet in case we didn't do something right let's hook the oscilloscope up so i'm going to use this little ground thing for the grounds and then let's see hook up each of these channels like that and i guess we'll just kind of leave things hanging like that seems okay then i'll go ahead and plug the usb in and the keyboard blinked and it does look like it's up to the computer and let's see if we're capturing anything let's just trigger where are we here trigger on just an edge okay so we're getting something and it looks like it might be usb maybe i don't know let's see here serial usb oh it's gonna be full speed oh and look at that we're decoding some stuff and now let's trigger on usb and yeah data are we getting a data packet are we getting a data packet we are getting a data packet i think it says we're getting a data pack oh that's really noisy but i guess this is not the world's greatest connection but yeah that's a data packet all right and it actually looks to be working so if i press well let's try that l o and p again so l or o is 12 p is 13 and l is f so we're actually getting those three characters that's better than the other keyboard and in theory we should be able to get up to six and if i press anything else it looks like that's not included but we haven't turned on the uh the end key rollover mode which we have to press was it this button and shift let's try that so shift and where'd that button go right here press that button oh something happened still getting data it still looks like six characters i do that right let's see so i press shift and this button one blink there we go that's different we're getting a bigger data packet interesting so we're getting a bigger data packet let's see if i can see how big there it is that the whole thing that is the whole thing so now let's see if i do so that's that looks like a very different format oh interesting so if i'm pressing semicolon you see it's changing that to an 8 but if i press a i get a one is it each yeah it looks like each yeah each key is a bit how about that so i press a i get a one if i press d i get an eight and if i press a and d i should get a nine because it's setting both of those bits yeah so a is it okay a is one b is two c is four d is eight so e would be 1 0 okay well i don't know exactly what the what the format here is but it does look like each key is setting a different bit and so you can press as many keys as you want and it'll just set each of the bits for each of the keys you're pressing so that looks like that's how this particular keyboard is doing the n key rollover which makes perfect sense it can you could press all 104 or however many keys there are on here simultaneously and it would just set all of the the bits and uh yeah that would that would work for nkey rollover so just playing with this it looks like the first bite is for the modifier keys the second and then from the second on it's just a bitmap of whatever keys you're pressing and each bit in there refers to one key and then whatever keys you press it sets those bits and then i guess you can switch it between end key rollover like this versus if i press shift and this button here that just shifts it back to this normal mode that we're kind of used to seeing where we get six key rollover and i guess that would be if your computer only supports this format and it is not able to negotiate to the other format but if it is then you press shift and looks like it doesn't there it goes it takes a couple tries it seems like interesting then you can switch to this end key rollover mode and press as many keys as you want so that's pretty cool so now i'm interested to see what it does when it switches between those two modes so let's go ahead and trigger on setup packets because i'm guessing it's going to just do a setup packet um so let's change this mode here yep and there's some setup packets and we're probably going to get a bunch of setup packets so let me do the segmented capture turn that on and see if we get a bunch of set segments there we got 25 segments another 25 so i'll just switch back and forth until we fill up our segment memory there we go and we've got all these segments so let me go ahead and try to save all this i'll go take a look at this okay so i've gone ahead and decoded the entire conversation when it's being switched into six key rollover mode or n key rollover mode just like i did in the previous video i made on usb human interface devices and the first thing i noticed is that when you switch it from one mode to the other basically the conversation that takes place makes it look to the computer is if you have unplugged one keyboard and plugged in a completely different keyboard it starts the conversation over from square one and in fact the first thing it does is it sets the usb address and in one case it's setting it to zero nine in the other case it's setting it to one nine and this is just an arbitrary sort of randomly assigned thing that the computer is just giving it an address so the fact that it's different means that from the computer standpoint this is a different device that's just been plugged in but otherwise the negotiation starts out the same so there's it's getting the device descriptor the vendor and product id are the same it's the same product i mean it's the same keyboard obviously still plugged in it's just reinitializing itself a little bit differently and so it gets the manufacturer description gets the product description and then it goes and gets the the configuration descriptor and all that's the same where we start to see differences is in the configuration descriptor although the configuration descriptor is also quite similar one thing i noticed though that's different from that simpler keyboard is that it says that there's two interfaces supported by by this configuration and it says that whether it's coming up in the six key rollover mode or the end key rollover mode and at first i thought that the two interfaces might refer to six key rollover versus end key rollover but that's actually turns out not to be true the first thing you see here this first you basically see an interface descriptor hid descriptor and endpoint descriptor followed by the second interface descriptor hid descriptor and endpoint descriptor and that's true in both cases so that's the two interfaces but really the only thing that's changing as it turns out is the first interface and at this point really the only thing that you can see that's different is the descriptor length so in this case it's 3f in this case it's three five and this hid descriptor of course is the thing that's describing the data format for the the keys that are being pressed so that i would expect that to be different and and so here we are seeing that it is going to be a different length so that makes sense but everything else here is the same in both cases so we've got this rehearsed interface and then the second interface is the same as well you can see in both cases the length is eight three so if i look at the for the six key rollover that length is also eight three so that's actually the same and as far as what the difference is between the first interface and the second interface we can look at a description so in either case it's described in the first interface is described in string three the second interface is described in string four and that's true in both cases and if we look at the next thing it does is it gets those strings and so all of this is identical and in both cases the string it gets for the first interface is keyboard and for the second interface is system control and so what's different here from that simpler keyboard is it only had one interface and so in this case we still have a keyboard interface but now we've got the system control interface which is new um and so that just seems to be something that this fancier keyboard supports that's that's different so that suggests that it's maybe a little bit more than just a keyboard but in either case everything else is basically the same until we get to that actual descriptor and so this descriptor here is describing the data format for the key presses and such and it looks very similar to the the descriptor that we saw on that cheaper keyboard in the in the previous video that i made and it looks very similar to the descriptor for the simpler keyboard um that only supports six key rollover because this is only supporting six key rollover and this is actually a fairly standard format where basically what you get is you get um eight one bit reports and these are the the eight modifier keys ctrl shift alt and windows key on both sides and then you get eight one bit reports that are constant so this is just sort of that unused byte and then you have this section here that's talking about the leds this is for input well i guess output from the from the computer standpoint and so this is all you know for the leds and then you get to this point here where we have six eight bit reports for the six keys that are being simultaneously pressed and then that's it and so this is in the six key rollover mode it gives you this this is the same thing that we saw on the on that simpler keyboard but when you switch it to n key rollover at this phase in the setup it gives you a totally different descriptor here and actually starts out the same because the first eight bits are the same modifier key so still going from e0 to e7 and it's eight one bit reports so that first byte is the same it's still the modifier keys but then we go on to something else that is actually in a very similar format to this so we're actually still set up for one bit reports but now we're saying we're going from zero to 67 or six seven hex and there's a total of six eight reports and so that zero to six seven refers to the the key codes so you know zero is well i guess it's reserved one is errors and such but eventually you get into you know four five six seven eight these are actual keys on on the keyboard and this table just goes through all of those keys and this is saying that we're basically going to encode all of the keys up to 6 7 is the maximum so we go all the way up to 6 7 which is the equals key on the keypad and then if you look after that it's f13 it's it's keys that a normal keyboard doesn't have but everything before that is just kind of your standard your standard keys that you would expect to find on a keyboard so basically what this descriptor is saying is it's saying all those standard keys we're going to map those each report is one bit so each of those is being mapped to one bit and there's going to be a hex 68 reports and six eight hex is uh well it's pretty close to 100 so that covers pretty much all the keys other than the the modifier keys we've already got here and it says those are all those are all variable inputs and at the end here we have what amounts to the same led uh thing here so it's you know there's five bits that are associated with leds and then three bits of padding here same thing five bits associated with leds three bits of padding and so this is really the only difference um the really substantial difference in the negotiation between when we're setting it in six key rollover mode versus end key rollover mode and really it's just describing that format that we just saw in the oscilloscope and then if we move on i mean basically the rest of this is all the same regardless of which mode we're in but it is a little bit interesting what it does because in either case it's defining this interface one which is just a separate interface that has totally different stuff it's the usage is not keyboard anymore it's system control this is totally different things defined by the usb hid spec and it has some interesting things in here so here it's there's a uh you know a few bits that are that are basically set up for these different functions that are defined in the spec for system power down system sleep system wake up and this actually makes sense because there's a key on the keyboard that allows you to put your computer to sleep and so this is this is how that works and so you can see it's got these three bits that are defined for that then there's five bits of padding here and then this is kind of interesting there's a this usage page ff00 which is the first page in kind of a range that's defined for just reserved for vendor-defined stuff so no idea what this is it's just defined by the vendor so it could be anything i really have no idea what what it is but then we get into this other interesting thing which is usage page c which is the what the usb spec calls the consumer page and there's all sorts of weird and interesting things uh defined in this consumer page for i guess controlling consumer electronics seems to be the the use case but in any event if we look at what's there and again it's the same regardless of which mode the keyboard is in it basically just assigns um a bit it's either zero or one to a whole bunch of these just sort of random things that are defined in that consumer electronic spec and some of these do correspond to some special keys that are on the keyboard so there's like a play pause there's a mute button there's an x track previous track these are buttons on the keyboard and i guess the way they work is they they send data reports through this other you know consumer page type type report although what's interesting is that the keyboard is defining all of these other functions that it apparently claims to have so in addition to the next track previous track play pause mute and volume that you know as far as i can tell the keyboard does support because there's actual buttons on it to do those things it's got things like bass boost and loudness and bass and treble increment decrement there's apparently it could support a key to open your email program or calculator or browser there's browser forward and back and home and refresh keys my assumption is that this particular keyboard manufacturer has other products that support these functions and so the chip on the keyboard is designed to support all these things even if the keyboard doesn't physically have those buttons so that's my guess or maybe there's some hidden key that i'm just unaware of on this keyboard but anyway i just thought that was interesting that the keyboard seems to support that anyway at that point it turns all the leds off and that's that's the end of the initialization and i've actually noticed if you push these uh other buttons here you'll see it looks like there's occasionally like a four byte thing it's actually easiest to notice if we turn the volume knob here so we turn that volume knob you see that four byte report that shows up there that seems to include that that second interface in fact i bet if we zoom in here let's see yeah you can see this is interface one we press keys but this other stuff there we go you can see it's switching to interface two to report that other stuff so anyway uh hopefully you found this interesting i i thought it's kind of interesting to see i'd heard that n key rollover i guess one way that keyboards implemented it because i don't know supposedly there was this limitation that you could only have six simultaneous keys that some keyboards would actually emulate multiple keyboards so that you get six keys per you know quote-unquote emulated keyboard but it's interesting to see that that no you don't need to do that you can just extend the protocol like this and you get full nkey rollover because you've got a bit for every key on the keyboard and you can just set whatever bits are currently pressed and it works it works really well so yeah hopefully you found that interesting and as always thanks to all my patrons who helped make these videos possible if you want to see more check out eater.net for more videos and projects and i guess now i've got this wacky keyboard with these wires hanging out of it
Info
Channel: Ben Eater
Views: 144,712
Rating: undefined out of 5
Keywords:
Id: 2lPzTU-3ONI
Channel Id: undefined
Length: 37min 19sec (2239 seconds)
Published: Sat Jul 31 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.