Skip to content

Latest commit

 

History

History
50 lines (32 loc) · 1.17 KB

GetAsyncKeyState.md

File metadata and controls

50 lines (32 loc) · 1.17 KB

Home

Function name : GetAsyncKeyState

Group: Keyboard Input - Library: user32


The GetAsyncKeyState 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 GetAsyncKeyState.


Code examples:

Reading the state of mouse buttons within DO WHILE loop
GDI+: Implementing image scrolling with inertia

Declaration:

SHORT GetAsyncKeyState(
  int vKey   // virtual-key code
);  

FoxPro declaration:

DECLARE INTEGER GetAsyncKeyState IN user32;
	INTEGER vKey  

Parameters:

vKey [in] Specifies one of 256 possible virtual-key codes.


Return value:

If the function succeeds, the return value specifies whether the key was pressed since the last call to GetAsyncKeyState, and whether the key is currently up or down.


Comments:

Check list of Virtual-Key Codes on the MSDN.