Jump to content
  • Advertisement
Sign in to follow this  
Ebola0001

reading more than 2 keys at once from a keyboard?

This topic is 4310 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was just wondering if it’s possible to read more than 2 at once, I’m working on a full 6d freedom game and it would be much easier to control if they weren’t limited to pressing only 2 keys at once, since I have keys set for: Yaw+ Yaw- Pitch+ Pitch- Roll+ Roll- X+ (Left) X- (Right) Y+ (Up) Y- (Down) Z+ (Forward) Z- (Back) I easily find myself trying to rotate in 2 directions, and move also and my computer doesn't recognize any keys after the first 2 and if you hold down 3 or more, it complains and beeps at you. :)

Share this post


Link to post
Share on other sites
Advertisement
Yep, there's nothing software-related about not being able to press more than 2 or 3 keys at a time. Most keyboards use a system of electrical interconnects which simply can't do more than that at a time. Moreover, each keyboard is different WRT which key combinations it will and won't recognize. Bottom line: modifier keys (ctrl, shift, alt) aside, don't count on users being able to press more than two keys simultaneously.

Share this post


Link to post
Share on other sites
You could fix the problem by keeping track of up and down key events. Have an array of booleans and when key (x) is pressed down set array[x] = true when key (x) goes up set array[x] = false
Every frame when you update your code you could check the array to see if key (x) is down and take action depending on the function of key (x)

Share this post


Link to post
Share on other sites
Quote:
Original post by SuperNerd
You could fix the problem by keeping track of up and down key events. Have an array of booleans and when key (x) is pressed down set array[x] = true when key (x) goes up set array[x] = false
Every frame when you update your code you could check the array to see if key (x) is down and take action depending on the function of key (x)

No. Again, this is not a software issue. The keyboard literally WILL NOT NOTICE that the extra key was pressed.

Share this post


Link to post
Share on other sites
Yes I never understood why no one came out with a USB keyboard that used individual key switches instead of the normal electrical matrix way. That way you could get any input sent to the keyboard into the computer. It may be a little less efficient, but with mice sending 2000dpi images to be read every millisecond or whatever I think it should be possible

Share this post


Link to post
Share on other sites
you could use a
789
4 6
123
setup for 4 dimensions and separate keys for other directions
or you could make it so only a key press (not holding down the key) will make you move in that direction, so repeated presses will accelerate/decelerate.
Or of course let the mouse have a part in movement.
Seems like you dont have many other options if the keyboard will only recognize 2 held down at once ><

Share this post


Link to post
Share on other sites
Quote:
Original post by neonic
Yes I never understood why no one came out with a USB keyboard that used individual key switches instead of the normal electrical matrix way. That way you could get any input sent to the keyboard into the computer. It may be a little less efficient, but with mice sending 2000dpi images to be read every millisecond or whatever I think it should be possible


It's simply a cost issue. Having 100 pins on your controller chip is expensive. Having 20 pins is cheap (a 10x10 matrix). Having 20 pins and some kind of of polling system is inaccurate.

Also, 2000dpi is reasonably low resolution when you're capturing such a tiny area.

Share this post


Link to post
Share on other sites
Pshh, they could just use a few multiplexers... It's not inaccurate if you're polling 1000x a second in hardware.

Share this post


Link to post
Share on other sites
The ZBoard supposedly allows up to 7 simultaneous key presses. Seeing as they claim "up to" 7 I'm not sure it would work, but unlike most keyboards it at least might.

The Razer Tarantula is currently unreleased (I've unreliably heard Sept 7), but claims "The Razer Tarantula's Anti-Ghosting Capability allows for unlimited simultaneous keystrokes without jamming."

Also some older (pre-PS2) keyboards did not face this problem.

A historical note: Way back in those pre-PS2 days PC games commonly allowed multiple players to share a single keyboard. This trend drastically decreased in popularity as access to LANs became more common.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!