Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Benjamin

Keyboard Input Problem??

This topic is 6927 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 write some code to detect the input for my "soldier". I use directional key for move and space for fire. When I try to push two directional keys(e.g. "UP" & "LEFT") at same time to perform a 45 degree move, I found the fire key just has no response. And this is different on different computers. Some computers, I could only success to fire when I push "UP" & "RIGHT", and some computer only success when "LEFT" & "DOWN" is pushed. And there is no any problem if I use NumPad for direction input. There is the code I used(I use DirectInput to get input): { if (key[DIK_SPACE]) //do fire here; if ((key[DIK_UP) && key[DIK_RIGHT]) // key[DIK_NUMPAD9]) //do up-right move else if ...... //similar code as above }

Share this post


Link to post
Share on other sites
Advertisement
I don''t think you can do anything about it, some keys dont work when others are pressed, has to to with the internal workings of keyboards, try it with any game, you will have the same problem. For example in nba live I cant use turbo and run left and shoot, so I just run out of bounds

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!