Author Topic: 6KRO or NKRO over USB? Any pros/cons?  (Read 16240 times)

0 Members and 1 Guest are viewing this topic.

Offline firebt

  • Thread Starter
  • Posts: 204
  • Location: Northern California
6KRO or NKRO over USB? Any pros/cons?
« on: Tue, 20 November 2012, 06:27:41 »
So, basically what the post says.  The odd thing is, on my Ducky, there is a dipswitch that enables you to switch between 6KRO and NKRO.  I'm assuming it can achieve NKRO since every switch has its own diode (LED) and can isolate all the signals or something? Not sure.

My question is, is there any disadvantage to having full NKRO vs 6KRO over USB? For example, is there any noticeable lag or any issues anyone encountered during gaming/typing?  Thanks again.  I don't think I'll use more than 6KRO for my games (Dota 2, HoN, CS:GO) so yeah.  But just wondering.

Offline IvanIvanovich

  • 20 Minutes into the FUTURE
  • * Global Moderator
  • Posts: 9775
  • Location: USA
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #1 on: Tue, 20 November 2012, 11:35:18 »
It really dosen't matter. NKRO mode con is the keyboard may not work proprly in bios. Really though anything more than 10KRO is essentially unneeded, unless you have extra fingers or like to type with both hands and feet at once.

Offline Binge

  • Island of Sandy Beaches
  • * Maker
  • Posts: 3545
  • Location: Binge Has
  • With Gentle Time. I Feel Very Nice.
    • Bingecap
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #2 on: Tue, 20 November 2012, 13:42:52 »
Every board I've had with #KRO hacks over USB have acted weird on some systems/OSes.  I really wish they would stop trying to make things more complicated and just push controllers to some new standard.  Anyone know what USB 3.0 can handle with respect to keyboards? lol
60% keyboards, 100% of the time.

"What the hell Jimmy?!  It was ruined before you even put it up there with your decrepit fingers."

Discuss Geekhack East!

Offline Azure Flash

  • Posts: 24
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #3 on: Tue, 20 November 2012, 13:54:54 »
It's a matter of drivers vs hardware interrupts more than it is about bandwidth. As many keyboard manufacturers have shown, USB2 is capable of NKRO with some driver tweaks. I'd expect USB3 to be pretty much the same deal as USB2, that is NKRO with some driver tweaks which will probably bring, as Binge said, problems with some OS.

The only real use for NKRO is for those rare quirky moments like wanting to bash your head on your keyboard to see what it does. Bashing your head on NKRO has a very interesting effect... on 2KRO, not so much. As such, I put #KRO at the very bottom of my list of criteria. There are enough variables in the selection of a keyboard already!

Offline Soarer

  • * Elevated Elder
  • Posts: 2672
  • Location: UK
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #4 on: Tue, 20 November 2012, 14:08:26 »
You can count on one hand the number of keyboards using full-speed USB, but they are the ones that can do >6KRO just fine, with no downsides. Whether they actually implement it correctly is another matter.

It doesn't matter if it says it's USB 1.1 or USB 2.0 - they can both support full-speed. (USB 2.0 added high-speed).

No driver tweaks are needed for NKRO using full-speed USB; it's all been there in the HID standard right from the beginning.

Dunno what the Ducky does, but if it shows up in device manager as a low-speed device you may as well leave it on 6KRO.

Offline firebt

  • Thread Starter
  • Posts: 204
  • Location: Northern California
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #5 on: Tue, 20 November 2012, 14:19:11 »
It says its a HID device and it shouldn't be low speed at all.  It's USB 2.0, so it's pretty quick.  Okay, sounds good, I'll just leave it at 6KRO for now, but we'll see.  Lol on the hands and feet comment and banging your head that was hilarious.

Offline Soarer

  • * Elevated Elder
  • Posts: 2672
  • Location: UK
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #6 on: Tue, 20 November 2012, 14:29:04 »
Ah, but USB 2.0 devices can still be either low, full or high speed. Many devices are USB 2.0 compliant AND low-speed, including most keyboards.

Offline Binge

  • Island of Sandy Beaches
  • * Maker
  • Posts: 3545
  • Location: Binge Has
  • With Gentle Time. I Feel Very Nice.
    • Bingecap
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #7 on: Tue, 20 November 2012, 15:03:25 »
Is it not a standard for USB 2.0 across each OS to register 6 keys pressed at a time?  My issue with USB 2.0 is THAT standard.  If a company made drivers for their peripheral for every OS I guess there would be no trouble, but by standard PS/2 was able to do NKRO regardless of the OS so why was that not included the USB standard?
60% keyboards, 100% of the time.

"What the hell Jimmy?!  It was ruined before you even put it up there with your decrepit fingers."

Discuss Geekhack East!

Offline firebt

  • Thread Starter
  • Posts: 204
  • Location: Northern California
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #8 on: Tue, 20 November 2012, 15:24:46 »
How do you check?

Offline Soarer

  • * Elevated Elder
  • Posts: 2672
  • Location: UK
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #9 on: Tue, 20 November 2012, 15:42:54 »
Is it not a standard for USB 2.0 across each OS to register 6 keys pressed at a time?  My issue with USB 2.0 is THAT standard.  If a company made drivers for their peripheral for every OS I guess there would be no trouble, but by standard PS/2 was able to do NKRO regardless of the OS so why was that not included the USB standard?

No. The USB standards don't say anything specific at all about keyboards or mice etc., in any version.

It's the HID standard that does. The 6-key plus modifiers report structure was only really intended to make life easy for BIOS (so they didn't have to parse report descriptors), but became a de-facto 'standard' for keyboards regardless. However, the HID standard allows for all sorts of different reports, and all major OS support it fully, so there's no need for extra drivers.

The other limitation is that a low-speed USB data packet can only be a maximum of 8 bytes. A report can be larger, but that starts taking a significant amount of time to send. The USB standard only allows a low-speed device to send one packet every 10ms (per endpoint). OS typically nudges that up to 8ms, i.e. 125Hz (without hacks). Taking up to 16ms to get a keypress to the host would be crap! So we've had a phase of makers trying to get more out of low-speed chips than they can really handle, with tricks like multiple endpoints etc. :(

Full-speed USB frees up those limitations. Each packet can be 64 bytes, and can be sent every 1ms (again, per endpoint). This allows the HID standard to be used to its full effect.

Finally, NKRO isn't done just for the sake of it. Doing full NKRO requires only one bit per key, rather than one byte, and doesn't have to treat modifiers as a special case. So a keyboard can send e.g. 104 keys in a mere 13 bytes - using the other scheme 13 bytes would only manage 11KRO (11 keys + modifiers + one reserved byte). Sure, that's still plenty of keys, but it's far less elegant a method (and still 'not-6KRO', so could still be incompatible with dumb hosts).

Offline Soarer

  • * Elevated Elder
  • Posts: 2672
  • Location: UK
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #10 on: Tue, 20 November 2012, 15:47:29 »
How do you check?

I dunno why it wasn't put in as one of the info fields in Device Manager (on Windows) - it should've been!

Something like USBDeview should be enough, not sure if it is though.

edit: Seems it isn't :(

OK, there's USBview, originally from Microsoft but found via TechRepublic.

With USBview, find your device in the tree and click on it, then in the right hand pane about a dozen lines down there will be a line saying e.g. "Device Bus Speed:   Low".
« Last Edit: Tue, 20 November 2012, 16:06:15 by Soarer »

Offline Binge

  • Island of Sandy Beaches
  • * Maker
  • Posts: 3545
  • Location: Binge Has
  • With Gentle Time. I Feel Very Nice.
    • Bingecap
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #11 on: Tue, 20 November 2012, 15:59:38 »
Is it not a standard for USB 2.0 across each OS to register 6 keys pressed at a time?  My issue with USB 2.0 is THAT standard.  If a company made drivers for their peripheral for every OS I guess there would be no trouble, but by standard PS/2 was able to do NKRO regardless of the OS so why was that not included the USB standard?

No. The USB standards don't say anything specific at all about keyboards or mice etc., in any version.

It's the HID standard that does. The 6-key plus modifiers report structure was only really intended to make life easy for BIOS (so they didn't have to parse report descriptors), but became a de-facto 'standard' for keyboards regardless. However, the HID standard allows for all sorts of different reports, and all major OS support it fully, so there's no need for extra drivers.

The other limitation is that a low-speed USB data packet can only be a maximum of 8 bytes. A report can be larger, but that starts taking a significant amount of time to send. The USB standard only allows a low-speed device to send one packet every 10ms (per endpoint). OS typically nudges that up to 8ms, i.e. 125Hz (without hacks). Taking up to 16ms to get a keypress to the host would be crap! So we've had a phase of makers trying to get more out of low-speed chips than they can really handle, with tricks like multiple endpoints etc. :(

Full-speed USB frees up those limitations. Each packet can be 64 bytes, and can be sent every 1ms (again, per endpoint). This allows the HID standard to be used to its full effect.

Finally, NKRO isn't done just for the sake of it. Doing full NKRO requires only one bit per key, rather than one byte, and doesn't have to treat modifiers as a special case. So a keyboard can send e.g. 104 keys in a mere 13 bytes - using the other scheme 13 bytes would only manage 11KRO (11 keys + modifiers + one reserved byte). Sure, that's still plenty of keys, but it's far less elegant a method (and still 'not-6KRO', so could still be incompatible with dumb hosts).

Thank you for clarifying that.  I was under the wrong impression from what I've heard, and this makes me want to look into this HID standard.  :)
60% keyboards, 100% of the time.

"What the hell Jimmy?!  It was ruined before you even put it up there with your decrepit fingers."

Discuss Geekhack East!

Offline Soarer

  • * Elevated Elder
  • Posts: 2672
  • Location: UK
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #12 on: Tue, 20 November 2012, 16:17:12 »
Thank you for clarifying that.  I was under the wrong impression from what I've heard, and this makes me want to look into this HID standard.  :)

It's very big!! And the 6KRO keyboard part is just one page or so in an Appendix  :))

Offline Lu_e

  • Posts: 797
  • Location: NWUSA
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #13 on: Tue, 20 November 2012, 16:28:40 »
Remember the old thread?

123456123456123456123456123456123456123456123456123456123456123456123456

:p
MX

Offline Soarer

  • * Elevated Elder
  • Posts: 2672
  • Location: UK
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #14 on: Tue, 20 November 2012, 16:46:47 »

Offline firebt

  • Thread Starter
  • Posts: 204
  • Location: Northern California
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #15 on: Wed, 21 November 2012, 01:41:17 »
Lol, I am a noob.   :)  So I got USBview and opened it up.  My computer is currently USB 3.0 capable.  Let me try it some more.  What should it say when it is high or low speed? Sorry lolll

Offline firebt

  • Thread Starter
  • Posts: 204
  • Location: Northern California
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #16 on: Wed, 21 November 2012, 01:47:56 »
Damnit, so I just checked.  My keyboard is a low speed USB.  So what does that mean in terms of latency and all that? Better to run in 6KRO or NKRO? Is there even a difference?  Anyone care to shed some more light on this topic?

So I just read your post.  So I get a lag time of atleast 8 ms or 125 Hz.  That's not too terrible, and on NKRO it takes less data to send more keys right?  So in a sense, wouldn't NKRO over USB be faster, since if I only use one or two keys at a time then it's a lot less data.  For example, if I pressed WA+Shift it would be 4 bytes since 2 bytes for keys, 1 for mod and 1 for reserve right?  So in 6KRO mode (8 bytes  6 keys 1 mod 1 reserve bit)...makes sense now...

But I'm assuming the latency 8 ms lag time doesn't change very much right?  Not sure how it affects all that.  Thanks :)
« Last Edit: Wed, 21 November 2012, 01:59:10 by firebt »

Offline TotalChaos

  • Posts: 829
  • Location: Houston, Texas
  • Indy Game Coder
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #17 on: Wed, 21 November 2012, 05:36:09 »
Every board I've had with #KRO hacks over USB have acted weird on some systems/OSes.  I really wish they would stop trying to make things more complicated and just push controllers to some new standard. 
There is a standard for achieving NKRO without any hacks and it is guaranteed to work on all OSes and all devices.  It is called PS/2.  It comes built in free with all good computers.  Try it, you'll like it.  :)
Rosewill RK-9000RE #1 (Broke on day 26, fixed with Scotch Tape on day 42, barely holding together)
Rosewill RK-9000RE #2 (Lubed, still in the box.  I am afraid to use it because it will break like the first one)

Offline Soarer

  • * Elevated Elder
  • Posts: 2672
  • Location: UK
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #18 on: Wed, 21 November 2012, 06:02:00 »
Damnit, so I just checked.  My keyboard is a low speed USB.  So what does that mean in terms of latency and all that? Better to run in 6KRO or NKRO? Is there even a difference?  Anyone care to shed some more light on this topic?

So I just read your post.  So I get a lag time of atleast 8 ms or 125 Hz.  That's not too terrible, and on NKRO it takes less data to send more keys right?  So in a sense, wouldn't NKRO over USB be faster, since if I only use one or two keys at a time then it's a lot less data.  For example, if I pressed WA+Shift it would be 4 bytes since 2 bytes for keys, 1 for mod and 1 for reserve right?  So in 6KRO mode (8 bytes  6 keys 1 mod 1 reserve bit)...makes sense now...

But I'm assuming the latency 8 ms lag time doesn't change very much right?  Not sure how it affects all that.  Thanks :)

Yeah, the lag time wouldn't change at all, assuming that the Ducky uses multiple endpoints (which would be typical). The lag is actually up to 8ms; it's a regular tick, and data (for all endpoints) is sent at the next tick. It depends on when you press your key as to how much the lag is. To put it into perspective, there's also delays within the keyboard when scanning and debouncing that can be 10s of ms.

HID keyboards always send a complete report, so there's no difference when you only press one or two keys. Even if there was a difference it would be tiny - each data packet is sent in a fraction of a ms.

Essentially, if it works OK with your OS and BIOS when set to NKRO then there isn't really any downside to you using it.

Offline Soarer

  • * Elevated Elder
  • Posts: 2672
  • Location: UK
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #19 on: Wed, 21 November 2012, 06:51:51 »
Every board I've had with #KRO hacks over USB have acted weird on some systems/OSes.  I really wish they would stop trying to make things more complicated and just push controllers to some new standard. 
There is a standard for achieving NKRO without any hacks and it is guaranteed to work on all OSes and all devices.  It is called PS/2.  It comes built in free with all good computers.  Try it, you'll like it.  :)

'All'  :))

What you mean is - all computers that have a PS/2 port. Which isn't many these days. Hence the qualifier 'good', when what you should honestly say is 'dying breed' :(

Here's a simple ranking for the tl;dr crowd: Full-speed USB  >  PS/2  >  Low-speed USB.

That ranking is true for the NKRO argument and the latency argument.

Offline firebt

  • Thread Starter
  • Posts: 204
  • Location: Northern California
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #20 on: Wed, 21 November 2012, 09:40:47 »
Gotcha.  Thanks for the input, I really appreciate it.  There's no way of boosting this device though right? It's just built this way?

Offline zpcrash

  • Posts: 10
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #21 on: Wed, 21 November 2012, 11:03:56 »
Here's a simple ranking for the tl;dr crowd: Full-speed USB  >  PS/2  >  Low-speed USB.

That ranking is true for the NKRO argument and the latency argument.

Hey, thanks for the discussion regarding USB low speed vs. full speed and the HID spec.  I was wondering how some vendors were able to support NKRO over USB while others could not.

You mentioned there are only a few keyboards using full speed USB.  Can you give us a list of these keyboards or information on where to find such a list?

Do you know how the Ducky Shine II does NKRO over USB?  You mentioned that Ducky might be using multiple endpoints instead of full speed.  Does this apply to the shine II? 

Offline jspark

  • Posts: 106
  • Location: New Jersey, USA
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #22 on: Wed, 21 November 2012, 14:52:28 »
I'm not a keyboard tech expert. Is NKRO really matter? I have two keyboards with MX switches and one IBM model m. I heard that IBM model M is only 2KRO, but I haven't experienced   differences between 2KRO and 6KRO. Maybe, it is because I don't play FPS games.
KBC Poker X Cherry MX Black switch
Filco Majestouch2 Ninja Cherry MX Blue switch
IBM Model M 1391401 in 1988

Offline Soarer

  • * Elevated Elder
  • Posts: 2672
  • Location: UK
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #23 on: Wed, 21 November 2012, 15:53:40 »
There's no way of boosting this device though right? It's just built this way?

It is what it is. Can't be changed without completely replacing the controller.

You mentioned there are only a few keyboards using full speed USB.  Can you give us a list of these keyboards or information on where to find such a list?

Microsoft Sidewinder X4 (yay, rubber dome! and oddball 20+KRO reports)
CoolerMaster CM Storm Pro (but not the Rapid)

errrm... maybe one or two others. I think we'll see a lot more in the next couple of years.

Do you know how the Ducky Shine II does NKRO over USB?  You mentioned that Ducky might be using multiple endpoints instead of full speed.  Does this apply to the shine II? 

I dunno... probably. Indicators that something has full-speed are claims of NKRO and Mac compatibility, or 1000Hz / 1ms polling. However, some claim things that aren't true, like Filco claiming 1000Hz on some models, and CM claiming 1000Hz on the Rapid (possibly just confusion at CM, since they were introducing the Pro at the same time).

I'm not a keyboard tech expert. Is NKRO really matter? I have two keyboards with MX switches and one IBM model m. I heard that IBM model M is only 2KRO, but I haven't experienced   differences between 2KRO and 6KRO. Maybe, it is because I don't play FPS games.

There's no absolute answer to that! For almost any gaming, 2KRO isn't enough. Also for gaming, the less latency the better (or failing that, at least a consistent latency) - that's the real benefit of full-speed, I think, but then the NKRO comes pretty much 'for free', so why not?! :D

Offline rootwyrm

  • Posts: 862
  • The Hands of Steel
    • My Website!
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #24 on: Wed, 21 November 2012, 17:14:00 »
I dunno... probably. Indicators that something has full-speed are claims of NKRO and Mac compatibility, or 1000Hz / 1ms polling. However, some claim things that aren't true, like Filco claiming 1000Hz on some models, and CM claiming 1000Hz on the Rapid (possibly just confusion at CM, since they were introducing the Pro at the same time).

CST-104's with the USB hub + Audio passthrough PCB set can go to 1ms polling, as well as current 'base' controllers. The controller can handle it just fine. Catch is that some are defaulted to request 1ms polling and some require it be set at host; don't ask me which keyboard is which. Meka G1 will definitely do 1ms, as will SteelSeries 6GV2.
"I remain convinced I am the only person alive who has successfully worn out an IBM Model M mechanically."
Daily Drivers: Ducky DK9008G2 Pro (PBT / Greens), 1994 Model M13, Sun Type4, and the rare IBM 1394540.

Offline Soarer

  • * Elevated Elder
  • Posts: 2672
  • Location: UK
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #25 on: Wed, 21 November 2012, 18:15:01 »
I dunno... probably. Indicators that something has full-speed are claims of NKRO and Mac compatibility, or 1000Hz / 1ms polling. However, some claim things that aren't true, like Filco claiming 1000Hz on some models, and CM claiming 1000Hz on the Rapid (possibly just confusion at CM, since they were introducing the Pro at the same time).

CST-104's with the USB hub + Audio passthrough PCB set can go to 1ms polling, as well as current 'base' controllers. The controller can handle it just fine. Catch is that some are defaulted to request 1ms polling and some require it be set at host; don't ask me which keyboard is which. Meka G1 will definitely do 1ms, as will SteelSeries 6GV2.

Maybe, but those are all low-speed devices (the hub might allow high- or full-speed, but the keyboard is low-speed). It doesn't matter if they ask for 1ms or not, they still can't do 1ms without hacks to drivers on the host.

And as for SteelSeries... the drivel they wrote in that USB vs PS2 section is just so lame :(

Offline firebt

  • Thread Starter
  • Posts: 204
  • Location: Northern California
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #26 on: Wed, 21 November 2012, 19:21:03 »
Wait, I just thought of something.  Since all mechanical switches have a "bounce" when the switch activates, and usually the latency they add for the is about 5 ms so that it doesn't automatically produce a double tap.  In this case, does this add or even have a factor to that? It doesn't matter though right, it's only for double-tapping aka re-engaging the same switch right?

Offline rootwyrm

  • Posts: 862
  • The Hands of Steel
    • My Website!
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #27 on: Wed, 21 November 2012, 20:07:41 »
Maybe, but those are all low-speed devices (the hub might allow high- or full-speed, but the keyboard is low-speed). It doesn't matter if they ask for 1ms or not, they still can't do 1ms without hacks to drivers on the host.

False; it's a standard setting and again, requestable by endpoint. So it's up to the manufacturer to set it correctly. (Or provide a driver definition which sets it correctly.) Either way, the simple fact is this:
"These limits apply to both (low-speed) and high speed devices"
"(a) keyboard could report up to three simultaneous keys using an array with three 8-bit fields (Report Size = 8, Report Count = 3)."
http://www.usb.org/developers/devclass_docs/HID1_11.pdf
So those are the limits. Anything else is a hack. Bet you any "6KRO" with a sniffer on the wire is actually 3+3 at 1ms. So speed actually has between zero and less than zero to do with rollover capability. It's just that most controllers that lie about or don't do rollover are low-speed and it was probably cheaper to use a high-speed PSoC for new designs. A low-speed can still do 3KRO/6KRO.

Quote
And as for SteelSeries... the drivel they wrote in that USB vs PS2 section is just so lame :(

Except not untrue; especially on the third party USB 3 stuff like NEC/Renesas. (When the hell did NEC start SUCKING at silicon anyway?) People may not notice it, but it's anywhere from 10-50 instructions executed every 1ms for any given attached endpoint when idling. More if the drivers suck or you permit devices to go to low power states. Even more if the device is actually doing anything. Plus interrupt load on a lot of 'em. But it's microbenchmarketing - same as the crap where people would whine about 2-4% CPU load when maxing out a NIC.
So yeah, it's a lot of marketing crap, but at least there's a shred of truth to it. Can't say that about, well, anything at all I've seen from Razer regarding their keyboards. And hey, at least SteelSeries didn't spread the ridiculous 'gold plated USB connector is magically better' crap, right?
"I remain convinced I am the only person alive who has successfully worn out an IBM Model M mechanically."
Daily Drivers: Ducky DK9008G2 Pro (PBT / Greens), 1994 Model M13, Sun Type4, and the rare IBM 1394540.

Offline Soarer

  • * Elevated Elder
  • Posts: 2672
  • Location: UK
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #28 on: Wed, 21 November 2012, 21:13:06 »
Maybe, but those are all low-speed devices (the hub might allow high- or full-speed, but the keyboard is low-speed). It doesn't matter if they ask for 1ms or not, they still can't do 1ms without hacks to drivers on the host.

False; it's a standard setting and again, requestable by endpoint. So it's up to the manufacturer to set it correctly. (Or provide a driver definition which sets it correctly.) Either way, the simple fact is this:
"These limits apply to both (low-speed) and high speed devices"
"(a) keyboard could report up to three simultaneous keys using an array with three 8-bit fields (Report Size = 8, Report Count = 3)."
http://www.usb.org/developers/devclass_docs/HID1_11.pdf
So those are the limits. Anything else is a hack. Bet you any "6KRO" with a sniffer on the wire is actually 3+3 at 1ms. So speed actually has between zero and less than zero to do with rollover capability. It's just that most controllers that lie about or don't do rollover are low-speed and it was probably cheaper to use a high-speed PSoC for new designs. A low-speed can still do 3KRO/6KRO.

No. That's incorrect on all counts.

As I said earlier, the spec. limits low-speed devices to a minimum interval of 10ms, and most OS nudge that down to 8ms (i.e. 125Hz):
Quote from: Universal Serial Bus Specification Revision 2.0, section 5.7.4, Interrupt Transfer Bus Access Constraints
An endpoint for an interrupt pipe specifies its desired bus access period. A full-speed endpoint can specify
a desired period from 1 ms to 255 ms. Low-speed endpoints are limited to specifying only 10 ms to 255 ms.

"keyboard could report up to three simultaneous keys...". The key word there is 'could'. It could also implement any number of other schemes, including 'boot-mode' 6KRO, or NKRO. Effectively all it has to do is have a report descriptor for it. Just considering the 6KRO that everyone knows:
Quote from: Device Class Definition for Human Interface Devices (HID) Version 1.11, Appendix F: Legacy Keyboard
Implementation
The limit is six non-modifier keys for a Boot Keyboard.
To clarify, that limit only applies to the Legacy Keyboard Implementation, i.e. boot-mode.

Speed has plenty to do with rollover, since a low-speed device can only send 8 bytes in a packet. I've already said how that limits it compared to full-speed.


Offline Soarer

  • * Elevated Elder
  • Posts: 2672
  • Location: UK
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #29 on: Wed, 21 November 2012, 21:28:57 »
Wait, I just thought of something.  Since all mechanical switches have a "bounce" when the switch activates, and usually the latency they add for the is about 5 ms so that it doesn't automatically produce a double tap.  In this case, does this add or even have a factor to that? It doesn't matter though right, it's only for double-tapping aka re-engaging the same switch right?

It adds to it - each step of the chain adds some latency. Debouncing is a pretty big one - Cherry say their switches can bounce for up to 5ms, but to debounce that takes longer. A typical implementation will wait until there has been no change for some ms, and that adds onto the (up to) 5ms that the switch bounces for. Often the debounce seems to be overly conservative, say 10ms or more, so it could be more than 15ms before the controller even thinks about putting it in an output buffer.

Seeing as the steps within the keyboard (and also within the host computer) are effectively mostly the same for any communication method, we can compare the comms in isolation.
« Last Edit: Wed, 21 November 2012, 21:39:31 by Soarer »

Offline TotalChaos

  • Posts: 829
  • Location: Houston, Texas
  • Indy Game Coder
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #30 on: Thu, 22 November 2012, 04:53:28 »
Quote
What you mean is - all computers that have a PS/2 port.

No.  What I meant was all.

Quote
Which isn't many these days. Hence the qualifier 'good', when what you should honestly say is 'dying breed'

No.

ALL computers can use PS/2 peripherals.  If you are too poor to afford an Elite high speed compatible PS/2 port then you can buy an Adapter for under $10.00 which converts USB into PS/2.  Yeah its not as kewl as a real PS/2 port but at least it works and lets you use elite PS/2 mice and keyboards.

PS2 > USB

PS2 is everywhere.  USB is not.
PS2 always works.
USB works most of the time but not always.  It works when it feels like it.

PS/2 uses at least 100x less CPU cycles to process an event than USB.  USB has massive amounts of overhead that PS/2 does not have.

USB was created to be cheap.  It was not created to be good.  USB 1.1 which all keyboards that I have studied so far use, is really horrible.

USB is made to be cheap to manufacture.  Bigshot manufacturers want you to use it because it saves them a buck.  Or 0.25 or 0.10.  It does not benefit the consumer in keyboards or mice.  It benefits the bigshot corporation.

USB 1.0, 1.1 and 2.0 are entirely CPU driven.  They waste stupid amounts of cpu power to process a tiny amount of information.

USB doesn't tell your computer you pressed a key like PS/2 does.  It transmits an entire packet of data...... s.... l.... o.... w.... l.... y..... and your cpu has to sit there and babysit the USB port for the entire transfer.
Useless.

USB 3.0 is completely different.  But they don't make USB 3.0 keyboards or mice so it isn't relevant.

PS/2 FTW!
Rosewill RK-9000RE #1 (Broke on day 26, fixed with Scotch Tape on day 42, barely holding together)
Rosewill RK-9000RE #2 (Lubed, still in the box.  I am afraid to use it because it will break like the first one)

Offline quadibloc2

  • Posts: 13
  • Location: Edmonton, Alberta
    • John Savard's Home Page
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #31 on: Thu, 22 November 2012, 05:40:56 »
The standard, published by Microsoft, for USB keyboards, defines how they communicate which keys are pressed; this has nothing to do with the standard for the Universal Serial Bus itself. That standard leads to only 6-key rollover being possible.

So an n-key rollover USB keyboard is using a nonstandard method of communicating, and thus needs a special driver. That's the "con". The "pro" is that n-key rollover lets you use the keyboard for some extra applications, such as games that let you play the piano with the keyboard's keys.

Offline tufty

  • Posts: 246
  • Location: French Alps
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #32 on: Thu, 22 November 2012, 06:32:47 »
ALL computers can use PS/2 peripherals.  If you are too poor to afford an Elite high speed compatible PS/2 port then you can buy an Adapter for under $10.00 which converts USB into PS/2.  Yeah its not as kewl as a real PS/2 port but at least it works and lets you use elite PS/2 mice and keyboards.
Bullhockey. 6 machines here, dating back to 2001, not a single ps/2 port between them (although one has an internally-ps2 connected trackpad). Ps/2 is dead or dying, no matter how 'kewl' you may consider it to be.

Yes, USB has a high cpu overhead (compared to ps/2, it's hard to deal with at the microcontroller level, which is why it needs to be is frequently dealt with by the cpu), yes it's often badly implemented at the device, host and software level. But usb is where it's at these days.

Suggesting avoiding the problems of usb by using something that converts ps/2 to usb is about the wrongest thing I've seen all week. And I've seen some real facepalmers.
« Last Edit: Thu, 22 November 2012, 07:52:56 by tufty »

Offline Soarer

  • * Elevated Elder
  • Posts: 2672
  • Location: UK
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #33 on: Thu, 22 November 2012, 07:19:15 »
The standard, published by Microsoft, for USB keyboards, defines how they communicate which keys are pressed; this has nothing to do with the standard for the Universal Serial Bus itself. That standard leads to only 6-key rollover being possible.

So an n-key rollover USB keyboard is using a nonstandard method of communicating, and thus needs a special driver.

Not true. The USB standard does not lead to only 6-key rollover being possible. Even a low-speed device with a single 8 byte report could do full NKRO for a 64-key keyboard. It would be completely compliant with both the USB and HID standards, and work on everything without a driver.

Even the low-speed NKRO keyboards out there that use the multiple device trick don't require a special driver on Windows. Someone did a hack for Macs to make them work there, since otherwise the two devices are treated as totally independent keyboards. So yeah, that multiple device trick is non-standard and gives USB even more of a bad name.

But that's low-speed USB, not full-speed, and it's vital to make the distinction.

Offline Soarer

  • * Elevated Elder
  • Posts: 2672
  • Location: UK
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #34 on: Thu, 22 November 2012, 07:27:04 »
PS/2's days are numbered. Full-speed USB keyboards are the future. Unfortunately, neanderthals are here to stay.

Myth #1: The CPU polls the keyboard. PS/2 is better because it uses an interrupt.

False. It's the USB chip that polls the keyboard. Read about USB drivers.

Myth #2: Keyboards will get swamped by other devices on USB. PS/2 is better because it has no contention.

False. USB devices reserve bandwidth, and are guaranteed to get it, unless you've put too many devices onto the same controller. Just don't do that! Read the USB specs.

Offline firebt

  • Thread Starter
  • Posts: 204
  • Location: Northern California
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #35 on: Thu, 22 November 2012, 08:36:01 »
Quick question Soarer, and sorry to keep you on this post for so long (but you are oh-so-informative), but in a sense isn't it faster to use NKRO if my BIOS can handle it? You said it takes only 1 bit instead of a byte to send a key press in NKRO mode, and that modifier bytes and reserve bytes (bits in this case) aren't used.  In a sense isn't it easier and faster to send 1 bit rather than a larger 1 byte packet? Sorry, I'm a mechanical engineer and a little bit new to computer science but am really interested, and if you could fill me in that would be great, thanks!


Offline Soarer

  • * Elevated Elder
  • Posts: 2672
  • Location: UK
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #36 on: Thu, 22 November 2012, 09:36:05 »
Nope, because it always sends a full report (be it 8 bytes or whatever). That isn't a problem though, since it's sent at 1.5Mbps even for low-speed, and takes only a fraction of a ms.

Offline firebt

  • Thread Starter
  • Posts: 204
  • Location: Northern California
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #37 on: Thu, 22 November 2012, 10:42:19 »
Oh, I see.  So regardless of what setting I put it at I should expect the same amount of latency, etc?  Only real difference is 64KRO since 8 bytes on "NKRO" setting.  Thank

Offline Soarer

  • * Elevated Elder
  • Posts: 2672
  • Location: UK
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #38 on: Thu, 22 November 2012, 14:53:04 »
Yeah, that's pretty much right, except it won't be 64KRO because when using bits it has to send a bit for every key on the keyboard. (My comment on 64KRO was just a hypothetical example of a setup that would be completely compliant with the standard, for low-speed USB). So yours is probably sending two packets in NKRO mode. The latency will be the same, but then when it actually sends, it will send 2 packets of 8 bytes each, within the same ms (no extra delay).
« Last Edit: Sat, 24 November 2012, 04:15:10 by Soarer »

Offline Chris_F

  • Posts: 37
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #39 on: Thu, 22 November 2012, 15:54:27 »
PS/2's days are numbered. Full-speed USB keyboards are the future. Unfortunately, neanderthals are here to stay.

Myth #1: The CPU polls the keyboard. PS/2 is better because it uses an interrupt.

False. It's the USB chip that polls the keyboard. Read about USB drivers.

Myth #2: Keyboards will get swamped by other devices on USB. PS/2 is better because it has no contention.

False. USB devices reserve bandwidth, and are guaranteed to get it, unless you've put too many devices onto the same controller. Just don't do that! Read the USB specs.

Not to mention that any modern implementation of PS/2 uses a Super I/O controller which is what is getting interrupted by the keyboard, not the CPU. So yeah, your awesome PS/2 keyboards are getting polled just like USB keyboards.

Hell, just look at a diagram. A PS/2 keyboard is actually further removed from the CPU than a USB keyboard. But whatever. There are some people who are simply beyond reason.

Q: The best keyboards ever made are from the early '80s and have buckling springs.
A: True

Offline TotalChaos

  • Posts: 829
  • Location: Houston, Texas
  • Indy Game Coder
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #40 on: Sat, 24 November 2012, 01:26:18 »
ALL computers can use PS/2 peripherals.  If you are too poor to afford an Elite high speed compatible PS/2 port then you can buy an Adapter for under $10.00 which converts USB into PS/2.  Yeah its not as kewl as a real PS/2 port but at least it works and lets you use elite PS/2 mice and keyboards.
Bullhockey. 6 machines here, dating back to 2001, not a single ps/2 port between them (although one has an internally-ps2 connected trackpad). Ps/2 is dead or dying, no matter how 'kewl' you may consider it to be.
Quote
I have a bazillion machines dating back to 1985 and they ALL have PS/2 keyboards and lasermice.    Why?  Because PS/2 rawkz.

The fact that you bought the wrong computers since 2001 does not make PS/2 suck.

You could have went to NewEgg or any of a million other places and bought yourself an elite PS/2 equipped computer.

You prob did a newb thing like bought all your puters at Best Buy or Radioshack.  Of course those guys rip you off.  Those guys will not let u buy a PS/2 computer.

But the point is you can buy a $10.00 adapter and plug in your antique $500.00 keyboard and it will work on any of your 2001+ computers.
 
Quote
Yes, USB has a high cpu overhead (compared to ps/2, it's hard to deal with at the microcontroller level, which is why it needs to be is frequently dealt with by the cpu), yes it's often badly implemented at the device, host and software level.
That is true.  M$ Windows does seem to handle USB in an inefficient manner.

Quote
But usb is where it's at these days.
I just bought an Intel Core i5 3.1Ghz quadcore processor with 2TB HD and 2 PS/2 ports at NewEgg 2 weeks ago.

Looks to me like PS/2 is where its at.  It has rock solid reliability and stands the test of time.
Rosewill RK-9000RE #1 (Broke on day 26, fixed with Scotch Tape on day 42, barely holding together)
Rosewill RK-9000RE #2 (Lubed, still in the box.  I am afraid to use it because it will break like the first one)

Offline tufty

  • Posts: 246
  • Location: French Alps
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #41 on: Sat, 24 November 2012, 02:49:07 »
Oh, you're funny.

Clue - using words like 'elite', 'newb' and 'rawks' doesnt make you sound 'kewl'. It makes you sound like a tool.

Now, if you'd like to rephrase your comment in terms adults won't laugh at, perhaps showing a certain understanding of how the two transport protocols differ, you might get taken seriously on a technical level. If you show an understanding of how the computer hardware market currently stands and the direction it's liable to take in the future, you might get taken a bit more seriously as well.

Otherwise, I'll let you get back to your toys. The purple plug goes in the purple socket, I'm sure you'll work it out in the end.

Offline Soarer

  • * Elevated Elder
  • Posts: 2672
  • Location: UK
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #42 on: Sat, 24 November 2012, 05:20:20 »
Yes, USB has a high cpu overhead (compared to ps/2, it's hard to deal with at the microcontroller level, which is why it needs to be is frequently dealt with by the cpu), yes it's often badly implemented at the device, host and software level. But usb is where it's at these days.

TBH this is a grey area on Windows. Certainly opaque, since we can't simply look at the source code! We surely should discount the l33t gamerz, who 99.999% of the time are merely parroting information that is very likely out of date and quite possibly dubious to begin with. They are also prone to over-generalizing.

Some of this 'knowledge' is based on using driver hacks to get 1000Hz polling for mice (which on XP has a side effect of putting all attached low-speed devices up to 1000Hz, which may bring additional problems). The trouble is that mice, unlike keyboards, nearly always have something to report, and in Windows that does result in a lot of processing - first in deciding which window the pointer is over, and second the application code for that window processing the mouse move event. So in that case it's no surprise that CPU load goes up when polling rate is increased.

But the same does not apply to keyboards. There is no breaking down of key events into smaller key events! So there's no extra load from processing more events when polling faster.

The term polling is misleading. Sure, that's what happens in the protocol - the host chip polls the devices to see if they have anything to send. But there's no reason that the polling can't be handled entirely within the host chip, which can then interrupt the CPU only when the device has sent something (or been disconnected etc). That's certainly how it works on the device side when using the hardware USB peripheral in the Atmel AVR - most of those are humble 8-bit CPUs running at a mere 16MHz!

Offline quadibloc2

  • Posts: 13
  • Location: Edmonton, Alberta
    • John Savard's Home Page
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #43 on: Sat, 24 November 2012, 11:41:34 »
Hell, just look at a diagram. A PS/2 keyboard is actually further removed from the CPU than a USB keyboard.

Of course, if you had a diagram of a PC (5150) or AT motherboard, it would tell a different story - back when they used an 8255 - which is why some people are confused by obsolete information.

Offline deepthawt

  • Posts: 125
  • Location: Wisconsin, USA
  • ︻̷̿┻̿═━一
    • my programming hobby site, interactive jigsaws, photos &c
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #44 on: Sat, 12 January 2013, 11:36:12 »
@soarer
The other limitation is that a low-speed USB data packet can only be a maximum of 8 bytes.
...
Finally, NKRO isn't done just for the sake of it. Doing full NKRO requires only one bit per key, rather than one byte, and doesn't have to treat modifiers as a special case. So a keyboard can send e.g. 104 keys in a mere 13 bytes - using the other scheme 13 bytes would only manage 11KRO (11 keys + modifiers + one reserved byte).

Thanks for that info! I've been wondering about that for some time.

FWIW here ia the USBView listing for a ducky Shine 9087
Looks like it draws up to 100 mA and has a poll interval of 0x0A, which i guess is 10 mS


Device Descriptor:
bcdUSB:             0x0110
bDeviceClass:         0x00
bDeviceSubClass:      0x00
bDeviceProtocol:      0x00
bMaxPacketSize0:      0x08 (8)
idVendor:           0x04D9 (Holtek Semiconductor, Inc.)
idProduct:          0x0174
bcdDevice:          0x0101
iManufacturer:        0x00
iProduct:             0x02
0x0409: "USB Keyboard"
iSerialNumber:        0x00
bNumConfigurations:   0x01

ConnectionStatus: DeviceConnected
Current Config Value: 0x01
Device Bus Speed:     Low
Device Address:       0x02
Open Pipes:              2

Endpoint Descriptor:
bEndpointAddress:     0x81  IN
Transfer Type:   Interrupt
wMaxPacketSize:     0x0008 (8)
bInterval:            0x0A

Endpoint Descriptor:
bEndpointAddress:     0x82  IN
Transfer Type:   Interrupt
wMaxPacketSize:     0x0008 (8)
bInterval:            0x0A

Configuration Descriptor:
wTotalLength:       0x003B
bNumInterfaces:       0x02
bConfigurationValue:  0x01
iConfiguration:       0x00
bmAttributes:         0xA0 (Bus Powered Remote Wakeup)
MaxPower:             0x32 (100 Ma)

Interface Descriptor:
bInterfaceNumber:     0x00
bAlternateSetting:    0x00
bNumEndpoints:        0x01
bInterfaceClass:      0x03 (HID)
bInterfaceSubClass:   0x01
bInterfaceProtocol:   0x01
iInterface:           0x00

HID Descriptor:
bcdHID:             0x0110
bCountryCode:         0x00
bNumDescriptors:      0x01
bDescriptorType:      0x22
wDescriptorLength:  0x003E

Endpoint Descriptor:
bEndpointAddress:     0x81  IN
Transfer Type:   Interrupt
wMaxPacketSize:     0x0008 (8)
bInterval:            0x0A

Interface Descriptor:
bInterfaceNumber:     0x01
bAlternateSetting:    0x00
bNumEndpoints:        0x01
bInterfaceClass:      0x03 (HID)
bInterfaceSubClass:   0x01
bInterfaceProtocol:   0x02
iInterface:           0x00

HID Descriptor:
bcdHID:             0x0110
bCountryCode:         0x00
bNumDescriptors:      0x01
bDescriptorType:      0x22
wDescriptorLength:  0x00A6

Endpoint Descriptor:
bEndpointAddress:     0x82  IN
Transfer Type:   Interrupt
wMaxPacketSize:     0x0008 (8)
bInterval:            0x0A


« Last Edit: Sat, 12 January 2013, 12:09:07 by deepthawt »
More
[| Ducky Shine II 9087 Yellow LED/BlueMX  |  Saitek Eclipse II  |  IBM Model M 1391401  | Cherry G80-5000  |  Logitech diNovo Mini  |  Microsoft Natural Ergonomic 4000  |  Matias Quiet Pro PC  |  Dell TH836  |  NEC KB-6923  |  Fujitsu FKB4700  |  GearHead Mini USB  KB1700U (89 key) | Filco Majestouch-2 ninja/blues  |   Matias Mini Quiet Pro PC | Ducky Shine 4/Clear MX | E Element RGB Silver/Black Outemu |]

Offline Saturn

  • Posts: 131
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #45 on: Sat, 12 January 2013, 12:38:12 »
PS2 > USB
-snip-

Except, USB supports hot swapping, and PS/2 does not.  You can do it, sure, and it'll be fine with most modern devices.  But you're not supposed to, and the interface wasn't designed for it.

And really that's the only difference between USB and PS/2 that the end user will ever see.  All the other supposed advantages of PS/2 are not something that will ever be seen in either gaming or typical usage by even the most hardcore geek.  You'll only see it if you're looking for it.

My dad insists that PS/2 is the only way to go, and that USB is crap for peripherals.  He also runs Windows XP SP2, and has a huge CRT television that uses loads of power and looks like crap.  Just thought I'd tell you about him.

Offline sethk

  • Posts: 1
Re: 6KRO or NKRO over USB? Any pros/cons?
« Reply #46 on: Sat, 12 January 2013, 14:40:28 »
So what common mechanical keyboards use full speed USB?