See also the WinGetPhysKeyState function. This function is used to determine whether a virtual key is up, down, or toggled.
This function can be used to obtain the state of the pointing device buttons with the VK_BUTTON1, VK_BUTTON2, and VK_BUTTON3 virtual key codes. The following are the possible values for the vkey parameter:
VK_BUTTON1
VK_BUTTON2
VK_BUTTON3
VK_ALT
VK_ALTGRAF
VK_CTRL
VK_SHIFT
VK_SPACE
VK_BACKSPACE
VK_TAB
VK_BACKTAB
VK_BREAK
VK_PAUSE
VK_NEWLINE
VK_END
VK_HOME
VK_LEFT
VK_UP
VK_DOWN
VK_RIGHT
VK_PAGEDOWN
VK_PAGEUP
VK_DELETE
VK_INSERT
VK_CAPSLOCK
VK_NUMLOCK
VK_SCRLLOCK
VK_PRINTSCRN
VK_ENTER
VK_ESC
VK_SYSRO
VK_ENDDRAG
VK_CLEAR
VK_EREOF
VK_PA1
VK_ATTN
VK_CRSEL
VK_EXCEL
VK_COPY
VK_BLK1
VK_BLK2
VK_MENU
VK_BIDI_FIRST
VK_BIDI_LAST
VK_DBCSFIRST
VK_DBCSLAST
VK_USERFIRST
VK_USERLAST
VK_F1
VK_F2
VK_F3
VK_F4
VK_F5
VK_F6
VK_F7
VK_F8
VK_F9
VK_F10
VK_F11
VK_F12
VK_F13
VK_F14
VK_F15
VK_F16
VK_F17
VK_F18
VK_F19
VK_F20
VK_F21
VK_F22
VK_F23
VK_F24