keyboard input

Is it possible to get the keyboard input every step in the program loop? When I try WM_KEYDOWN I get the "writing delay". I don't want that.
Off the top of my head I can't think of a function in the Win32 API that changes the delay when reading keys. You could pass the Virtual Key Code into a loop that continuously calls "GetASyncState()" and does what ever while that function returns true. I would even go so far as to suggest doing this in a separate thread so that it does not interrupt your program execution if possible.

GetASyncKeyState(): http://msdn.microsoft.com/en-us/library/windows/desktop/ms646293(v=vs.85).aspx

CreateThread(): http://msdn.microsoft.com/en-us/library/windows/desktop/ms682453(v=vs.85).aspx
That might do. I'll give it a try.
Topic archived. No new replies allowed.