geekhack

geekhack Community => Keyboards => Topic started by: magohipnosis on Sat, 11 January 2014, 10:40:38

Title: How do they achieve this?
Post by: magohipnosis on Sat, 11 January 2014, 10:40:38
Hello, 2 months ago, I bought a QFR with brown switches that had 6K Rollover in USB mode and N Key Rollover in PS/2 mode.

2 weeks ago I bought QFTK with red switches that has N Key rollover in USB mode.

My question is... How do they achieve N Key Rollover via USB?

It is weird that even testing it with Aqua it shows effective N Key rollover via USB.

Many people have said that N Key rollover is impossible over USB mode, so my question is... HOW?

Thanks in advance
Title: Re: How do they achieve this?
Post by: C5Allroad on Sat, 11 January 2014, 10:51:43
I think it makes the computer think that there is more than one keyboard plugged in at the same time...
It works; sometimes that is the bios.
Title: Re: How do they achieve this?
Post by: Oobly on Sat, 11 January 2014, 10:55:48
Full speed USB supports NKRO. USB low speed boot protocol is only 6KRO. If you want to use the keyboard in BIOS or GRUB, etc it needs to support boot protocol.

Most keyboards use low speed USB boot protocol so they work for everything. Some support both, but have a switch to switch between them, some use a key combination to do the switching and some implementations allow BOTH protocols to be supported at the same time (at the cost of sending bigger or more packets).
Title: Re: How do they achieve this?
Post by: magohipnosis on Sat, 11 January 2014, 20:39:23
Might it be because I'm using USB 3.0 then?
Title: Re: How do they achieve this?
Post by: tuxsavvy on Sat, 11 January 2014, 23:18:34
USB3.0 is known as Super Speed. Not Hi Speed, Hi Speeds were implemented in USB2.0.

Sources:
Title: Re: How do they achieve this?
Post by: Melvang on Sun, 12 January 2014, 20:44:45
I will chime in and say that to my knowledge the easiest way to implement NKRO over USB is to trick the computer into seeing multiple devices.  While this does work nicely for the vast majority of windows machines (my guess would be 99%+) it does not play nice with Mac Os's due to the way it handles multiple devices for the same purpose.
Title: Re: How do they achieve this?
Post by: Findecanor on Mon, 13 January 2014, 00:47:50
I am not sure that is how MacOS breaks. Two keyboards connected to different USB ports worked pretty well the last time I tried it, even holding Shift on one keyboard, pressing A on the other keyboard and getting an upper-case 'A' in the text editor ... but I admit that these were both Apple aluminium keyboards, which might have a better driver.

The USB HID protocol is a bit complex, involving a format for the host to parse, and where there is complexity of this sort, there are often different interpretations.
Soarer found a much better way to do NKRO over USB that works on both MacOS, Linux, Windows and most BIOSes without breaking: Send always a 6KRO "boot" report and use a proper NKRO protocol that contains a bit for each key in the packet, but tell the host in a "report descriptor" that the 6KRO packets are empty. All real OS:es will adhere to the report descriptor and thus use only the NKRO packets, but some BIOS:es will ignore it and will blatantly assume that the keyboard talks the "boot" protocol -- which it also does.
Title: Re: How do they achieve this?
Post by: dorkvader on Mon, 13 January 2014, 02:25:33
I am not sure that is how MacOS breaks. Two keyboards connected to different USB ports worked pretty well the last time I tried it, even holding Shift on one keyboard, pressing A on the other keyboard and getting an upper-case 'A' in the text editor ... but I admit that these were both Apple aluminium keyboards, which might have a better driver.

The USB HID protocol is a bit complex, involving a format for the host to parse, and where there is complexity of this sort, there are often different interpretations.
Soarer found a much better way to do NKRO over USB that works on both MacOS, Linux, Windows and most BIOSes without breaking: Send always a 6KRO "boot" report and use a proper NKRO protocol that contains a bit for each key in the packet, but tell the host in a "report descriptor" that the 6KRO packets are empty. All real OS:es will adhere to the report descriptor and thus use only the NKRO packets, but some BIOS:es will ignore it and will blatantly assume that the keyboard talks the "boot" protocol -- which it also does.
I think you'll end up with odd key repeats: like holding down two keys will repeat them both as in ababababa instead of baaaaaaa or abbbbbb as you would expect on a "normal" keyboard. I don't use OS X so I can't comment on it's failings.

as far  as booting, I just set my computer to hibernate and the bios to wake on USB event. Then I just press any key on my KB to wake it up.
Title: Re: How do they achieve this?
Post by: Findecanor on Mon, 13 January 2014, 03:20:24
I think you'll end up with odd key repeats: like holding down two keys will repeat them both as in ababababa instead of baaaaaaa or abbbbbb as you would expect on a "normal" keyboard. I don't use OS X so I can't comment on it's failings.
With USB, key repeat is in software by the host operating system so you should theoretically not get that problem. The exception is with weird gaming keyboards that repeat its own keys to be able to repeat them faster. Only on AT/PS/2 does the keyboard itself repeat.