DECLAREINTEGER GetKeyState IN user32;
[in] Specifies a virtual key.
If the desired virtual key is a letter or digit (A through Z, a through z, or 0 through 9), nVirtKey must be set to the ASCII value of that character. For other keys, it must be a virtual-key code.
The return value specifies the status of the specified virtual key.
The key status returned from this function changes as a thread reads key messages from its message queue. The status does not reflect the interrupt-level state associated with the hardware. Use the GetAsyncKeyState function to retrieve that information.
To retrieve state information for all the virtual keys, use the GetKeyboardState function.