GetKeyState function (winuser.h) - Win32 apps

Retrieves the status of the specified virtual key. The status specifies whether the key is up, down, or toggled (on, off�alternating each time the key is pressed).