LabWindows/CVI

Content Type
Programming Language
Current manual

GetKeyPressEventModifiers

GetKeyPressEventModifiers

int GetKeyPressEventModifiers (int eventData2);

Purpose

Call this function when you receive an EVENT_KEYPRESS in a panel or control callback to get the modifier keys that were pressed.

Parameters

Input
Name Type Description
eventData2 int The panel or control callback's eventData2 parameter.

Return Value

Name Type Description
modifiers int The modifier keys if the EVENT_KEYPRESS event contains any modifier keys. If the event does not contain any modifier keys, this value is 0. This function can return the following modifiers:
  • VAL_SHIFT_MODIFIER— The <Shift> key.
  • VAL_MENUKEY_MODIFIER—The <Ctrl> key.
  • VAL_SHIFT_AND_MENUKEY—Both the <Shift> key and the <Ctrl> key.
  • VAL_UNDERLINE_MODIFIER—The <Alt> key.
Negative values indicate that an error occurred.

Additional Information

Library: User Interface Library

Include file: userint.h

LabWindows/CVI compatibility: LabWindows/CVI 6.0 and later

Example

Refer to userint\multikey.cws for an example of using the GetKeyPressEventModifiers function.

Was this information helpful?

Help us improve your future ni.com experience.

Did you find the documentation you were looking for?

Submit