Group: Keyboard Input - Library: user32
The GetAsyncKeyState function determines whether a key is up or down at the time the function is called, and whether the key was pressed after a previous call to GetAsyncKeyState.
Reading the state of mouse buttons within DO WHILE loop
GDI+: Implementing image scrolling with inertia
SHORT GetAsyncKeyState(
int vKey // virtual-key code
);
DECLARE INTEGER GetAsyncKeyState IN user32;
INTEGER vKey
vKey [in] Specifies one of 256 possible virtual-key codes.
If the function succeeds, the return value specifies whether the key was pressed since the last call to GetAsyncKeyState, and whether the key is currently up or down.
Check list of Virtual-Key Codes on the MSDN.