AIT_GetKeyState
Description
Acquires key status.
Format
int AIT_GetKeyState (
integer nVirtualKey // Virtual key
);
Parameters
nVirtualKey (input)
Specify a virtual key code whose key status you want to acquire.
You have to set one of the following values.
Value | Description |
---|---|
NUMLOCK | Num Lock key |
SCROLLLOCK | Scroll Lock key |
CAPSLOCK | Caps Lock key |
Return values
The return value is 1 if the key is on, and 0 if it is off. The return value is -1 if the function has not been executed successfully.
If the function has returned -1, you can use AIT_GetLastError to acquire an extended code. The following gives the error code that AIT_GetLastError might return:
Extended error number | Error code |
---|---|
87 | ERROR_INVALID_PARAMETER |