Jump to content
  • Advertisement
Sign in to follow this  
yogr

Input wrappers

This topic is 3684 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

Hi guys! I'm developing some DirectInput wrapper classes to handle mouse and keyboard input for a game. I finished my KeyboardDevice Class but yesterday I read some other post and a well known microsoft article about not using DirectInput to handle mouse and keyboard input (DAMN IT!). I'm planning to leave the keyboard wrapper unchanged (it uses immediate input for real time game controls), and to use the windows input messages for mouse input and GUI keyboard input (i.e.: typing characters in a text field). Do you think this is a good plan or a stupid idea? Thanks, bye.

Share this post


Link to post
Share on other sites
Advertisement
Why can't you convert your keyboard handler to a message based system too? All you need to do is set a flag when a key goes down and clear a flag when the key is released. Then you can poll those flags at any time to get the immediate keyboard state.

Share this post


Link to post
Share on other sites
Ehy, the windows key is not disabled anymore, as I suspected!
Should I use a keyboard hook or there exists a better way?

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.

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!