A question about keydown(key_xyz)

BlitzMax Forums/BlitzMax Beginners Area/A question about keydown(key_xyz)

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

This problem has everything to do with the keyboard, and nothing to do with the OS. It was a problem even in the days of DOS when accessing the keyboard directly.

It occurs because of how the circuits are laid out.

Imagine your keyboard is laid out like this:

  1 2 3 
  | | |
a-Q-W-E-
  | | |
b-A-S-D-
  | | |
c-Z-X-C-
  | | |



Now here is what happens if you hold down one key at a time, and keep them held down:

Q = Lines 1,a broken.
W = Lines 1,a,2 broken.
A = Lines 1,a,2,b broken.
S = Lines 1,a,2,b broken.

OOPS! The state did not change when S was held down! All lines that S was connected to were already broken.

So that's the main issue. I couldn't tell you why just space and left arrow would cause a problem though. In theory with this sort of layout you have to hold at least three keys at once before this issue should arise. Even taking into account weird wiring layouts, you still shouldn't have a mere two keys conflicting.

I'd say get a new keyboard, but that won't solve the issue of your users running into this problem. But that's why most games let you configure your keys. And as far as my experience goes, this issue doesn't generally crop up with your standard control schemes on most keyboards.

I suppose it's possible the OS is also doing something to affect this, but if it is that's just sloppy ass programming on their part.