Quote Originally Posted by hwnd View Post
So i guess keydown/keyup are not for games.
That is right. Using OnKeyDown and OnKeyUp is not good idea for games as it relies on Wndows messages. And since redrawing of the window which is in the end also done using Windows message which has much higher priority it means that the OnKeyDown/OnKeyUp messages gets processed much later.

Most game engines register their own Keyboard hook (catch key presses on system level - even before Windows message for key press is generated and sent to active application) which alows you to handle the key presses with your own system which doesn't necessarly relies on Windows messages.
Actually using keyboard hook you could cause huge havoc on the computer as you can force system to generate wrong Windows messages for key presses.