int GetAsyncKeyState(vKey)
This 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 the GetAsyncKeyState function. If the most significant bit of the return value is set, the key is currently down; if the least significant bit is set, the key was pressed after a previous call to the function.
Parameter | Type/Description |
vKey | int Specifies one of 256 possible virtual-key code values. |
The return value specifies whether the key was pressed since the last call to GetAsyncKeyState and whether the key is currently up or down. If the most significant bit is set, the key is down, and if the least significant bit is set, the key was pressed after a preceding GetAsyncKeyState call.