geekhack

geekhack Community => Keyboards => Topic started by: metalliqaz on Mon, 20 May 2013, 21:35:37

Title: How keyboards handle USB HID's 6-key limit
Post by: metalliqaz on Mon, 20 May 2013, 21:35:37
Has anyone ever noticed how different keyboards handle the 6kro limit of USB keyboards?  I did.  This video is slow and boring, but it illustrates what I mean...


Featured: Realforce, KMAC, and my firmware.

I'd like to get an accounting of how different keyboards react to hitting the 6-key limit.  I own a Filco but I took out the controller.  My Leopold features 15kro and I don't have enough fingers to test it.
What about Ducky, Poker, etc.?

Has this ever been covered before?  Am I the only person who cares??
Title: Re: How keyboards handle USB HID's 6-key limit
Post by: hasu on Tue, 21 May 2013, 05:32:39
Has this ever been covered before?  Am I the only person who cares??

No, you are not alone. This is exactly what I've wanted to discuss. I think you are first person who refer to this but old NKRO thread may have discussed this topic.

In Japanese gaming community terminology, Realforce is occasionally known as 'N-kee rolu-obaaaah' :)
Yeah, Realforce(and HHKB, other Topre) is not NKRO in terminology of GH, however, it can be seen as quasi-, pseudo- or half-NKRO. Another interesting topic is what the definition of 'Roll Over' is.

Realforce way is very reasonable to me, it is what I want to implement on my firmware if I have a time.

BTW, my firmware does different way than those, it never registers 7th or above keys, ignore them completely.
Title: Re: How keyboards handle USB HID's 6-key limit
Post by: metalliqaz on Tue, 21 May 2013, 07:32:43
That's interesting.  You prefer favoring First Key Pressed instead of Last Key Pressed.  I also have a hard time holding Realforce up as the ideal, because it can unpress keys that you are holding down.
Title: Re: How keyboards handle USB HID's 6-key limit
Post by: Soarer on Tue, 21 May 2013, 08:13:43
I've never really cared enough to examine what various keyboards do beyond 6 keys, as long as they don't end up with stuck keys or whatever!

I prefer that the first keys are held too. So any key down events occurring while 6 keys are already pressed are simply ignored. And I think I'd be happy if it never output such a key - even if one of the first keys is released and room becomes available. (That's probably what my firmware does, since it deals with key events rather than key state).
Title: Re: How keyboards handle USB HID's 6-key limit
Post by: metalliqaz on Tue, 21 May 2013, 08:21:55
Yes mine deals with events as well.  I consciously chose to favor newer keypresses, because I figured that if that situation actually came to pass outside of a test, it would be better to react to the most recent input rather than appear to do nothing.
Title: Re: How keyboards handle USB HID's 6-key limit
Post by: Soarer on Tue, 21 May 2013, 08:45:24
Without using >6KRO, there's no 'right' way to handle >6 keys, obviously. In a sense, booting one out of the buffer to make way for the latest is perhaps slightly better, because then you keep using all 6 slots of the buffer. (My way leaves some unused, but since I'm always running NKRO as well, my 6-key is only for talking to the BIOS).
Title: Re: How keyboards handle USB HID's 6-key limit
Post by: Masterchief79 on Tue, 21 May 2013, 08:52:56
Also funny to see on my AEK2 with an compucable miniADB-USB adapter. When I press the 6th key, the first one is fluctuating (on-off-on-off). Also tested it with Aquas key test.
Title: Re: How keyboards handle USB HID's 6-key limit
Post by: hasu on Tue, 21 May 2013, 19:31:55
Soarer, your firmware uses only NKRO report while in report mode or communicating with OS? Or 6KRO report is used for first 6 keys, then NKRO report for more than 6 keys?

KMAC behavior is a bit weird and it seems to make report simply from matrix state each time.

metalliqaz, don't your firmware and KMAC register key unintentionally when you release 7th key? I suppose if you press ASDFJKL then you will get 'asdfjkla' on Notepad.
Title: Re: How keyboards handle USB HID's 6-key limit
Post by: Soarer on Tue, 21 May 2013, 20:01:22
Well, I run both at the same time, with the same keys in them (as far as possible), unless something like BIOS does SetProtocol. But the 6KRO report descriptor tells the OS that it doesn't contain any keys, so only the NKRO report gets used in the end when in report mode.
Title: Re: How keyboards handle USB HID's 6-key limit
Post by: metalliqaz on Tue, 21 May 2013, 20:35:24
Soarer, your firmware uses only NKRO report while in report mode or communicating with OS? Or 6KRO report is used for first 6 keys, then NKRO report for more than 6 keys?

KMAC behavior is a bit weird and it seems to make report simply from matrix state each time.

metalliqaz, don't your firmware and KMAC register key unintentionally when you release 7th key? I suppose if you press ASDFJKL then you will get 'asdfjkla' on Notepad.

In the video I was holding the keys.  If I am still holding it down when I release the 7th key, then it reregisters.  That's a good point about the double 'a', however I was thinking more of the video game angle when I chose how it works.   See this is why I posted, so I could see from another angle.  Perhaps i will make that behavior configurable.
Title: Re: How keyboards handle USB HID's 6-key limit
Post by: hasu on Tue, 21 May 2013, 21:42:31
Ah, I see.  What about implementing NKRO on your firmware instead of elaborate 6KRO? If gamers need to use more than 6 keys simultaneously they'll like to have full NKRO. Though, I d'ont know about game at all.

OTOH, for normal users or typing use Realforce way seems to be nice and have no harm in many cases. But I'm not sure if it is actually needed.
Title: Re: How keyboards handle USB HID's 6-key limit
Post by: BlueMica on Tue, 21 May 2013, 22:07:27
I believe NKRO requires diodes to enable it, as seen in WFD's videos.
Title: Re: How keyboards handle USB HID's 6-key limit
Post by: metalliqaz on Tue, 21 May 2013, 22:13:53
Ah, I see.  What about implementing NKRO on your firmware instead of elaborate 6KRO? If gamers need to use more than 6 keys simultaneously they'll like to have full NKRO. Though, I d'ont know about game at all.

OTOH, for normal users or typing use Realforce way seems to be nice and have no harm in many cases. But I'm not sure if it is actually needed.

It supports NKRO internally, this is what it does when it is in basic HID keyboard mode.  I don't know why it interested me so much

I believe NKRO requires diodes to enable it, as seen in WFD's videos.

Yes, thanks :))  Of course I designed diodes into the matrix