GetAsyncKeyState and GetKeyboardState

Started by
0 comments, last by ApochPiQ 17 years ago
what is different between them? If I need know what key down ,which to use?
Advertisement
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:
GetKeyboardState
GetAsyncKeyState

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

This topic is closed to new replies.

Advertisement