imaqGetLastKey

NI Vision for LabWindows/CVI Function

imaqGetLastKey

Usage

int imaqGetLastKey(char* keyPressed, int* windowNumber, int* modifiers);

Purpose

Returns the last key pressed in an active image window.

Parameters

Name

Type

Description

keyPressed char* On return, keyPressed contains the last key pressed. The function sets keyPressed to -1 if there was no new key press to retrieve. Set this parameter to NULL if you do not need this information.
windowNumber int* On return, windowNum contains the window number of the window in which the key press was caught. The function sets windowNum to -1 if there was no new key press to retrieve. Set this parameter to NULL if you do not need this information.
modifiers int* On return, modifiers contains a bit-shifted value indicating what modifiers, if any, the function applied to the key press. The following are possible modifiers:
IMAQ_SHIFT
IMAQ_ALT
IMAQ_CTRL
IMAQ_CAPS_LOCK
Set this parameter to NULL if you do not need this information.

Return Value

Type

Description

int On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().