GetKeyState(Key: Keys): Boolean;
Key. The key, which state is to be checked.
The GetKeyState method returns status (pressed or released) of a key in the message queue.
The method returns True if the key passed by the Key parameter is currently pressed.
On executing long-term processes the message queue is processed with application after completing the process. In this case it is recommended to use the GetAsyncKeyState method.
See also: