Author Topic: This Week's Dumb Question About Multiple Simultaneous INKEY$ Handling  (Read 5429 times)

0 Members and 1 Guest are viewing this topic.

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: This Week's Dumb Question About Multiple Simultaneous INKEY$ Handling
« Reply #15 on: June 12, 2019, 02:31:28 pm »
A nice link on the subject: http://blog.controlspace.org/2010/08/n-key-rollover-what-it-is-and-how-to.html

And to explain the USB and PS/2 difference: 
Quote
PS/2 vs USB Technical Limitations

Keep the following in mind if you have an n-key rollover keyboard that can be hooked up to your computer through either USB or a PS/2 port:
USB protocol limitation - A max of 10 simultaneous key presses are recognized, 6 non-modifier keys ('w', 'a', 's', 'd', etc) + 4 modifier keys (Shift, Caps, Ctrl, etc).  Although you are limited to 6 regular keys you are still guaranteed that any combination of keys will be recognized properly if you have an n-key rollover keyboard. I would guess that most people would not need support for more keys than this. I would also guess that the 6 key limit may have had something to do with braille input requirements rather than someone choosing an arbitrary limit (although that doesn't explain why the limit exists in the first place).
PS/2 - There are no limitations when using a PS/2 connection with your keyboard. You will truly get full n-key rollover support.
When given the choice between using PS/2 or USB, it is generally recommended to choose PS/2 since it doesn't have the rollover limitations.  However, if you enjoy hotplug support which PS/2 doesn't have, USB may very well be the better choice for you.
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline Raven_Singularity

  • Forum Regular
  • Posts: 158
    • View Profile
Re: This Week's Dumb Question About Multiple Simultaneous INKEY$ Handling
« Reply #16 on: June 12, 2019, 08:02:23 pm »
From my personal experience, most USB keyboards top out at 6KRO, while you need a PS/2 keyboard for NKRO usage.

Really?

I've never encountered a PS/2 keyboard that could handle even 4 simultaneous keys down, unless the keys included the standard modifiers (Ctrl, Alt, Shift).  Haven't seen a PS/2 keyboard that could handle A+B+C+D.


Edit:
Thanks for the link.
« Last Edit: June 12, 2019, 08:04:22 pm by Raven_Singularity »