Sign in to follow this  

GetAsyncKeyState and GetKeyboardState

Recommended Posts

You should probably use GetAsyncKeyState. GetKeyboardState will return different results based on how many Windows messages you have processed in your message pump, so it will change over time; what it returns is not necessarily the keys that are pressed right now. For that, you need to call GetAsyncKeyState.

See the MSDN documentation on both functions for details:

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this