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.

ValueDescription
NUMLOCKNum Lock key
SCROLLLOCKScroll Lock key
CAPSLOCKCaps 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 numberError code
87ERROR_INVALID_PARAMETER