Jump to content
  • Advertisement
Sign in to follow this  
adam17

random keyboard input

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

im finally transporting my console code from the windows console into my opengl app. within the windows console you can use _getch() to handle input. the problem though is the program stops and waits for input. i need a function or method or something that can handle input that doesnt wait for the user. ive been playing around with GetAsyncKeyState but the problem is i would have to sort through 256 keycodes to figure out what key was hit. any suggestions on what i should use?

Share this post


Link to post
Share on other sites
Advertisement
Use the UINT msg parameter(#2) in the window procedure,when it is WM_KEYDOWN use a switch statement with wParam to get the key pressed.

Share this post


Link to post
Share on other sites
WM_KEYDOWN works but it only responds when a key i pressed, not held. after a few milliseconds it then starts sending the WM_KEYDOWN message consistantly but at a very slow rate.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!