LabWindows/CVI

Content Type
Programming Language
Current manual

PackKeyCodeUnicode

PackKeyCodeUnicode

KeyCodeUnicode PackKeyCodeUnicode (int unicodeCharCode, int virtualKey, int modifiers);

Purpose

Packs a Unicode code point, a virtual key, and a modifier key into a Unicode key code.

Parameters

Input
Name Type Description
unicodeCharCode int The value representing the Unicode code point of the key.

The Unicode code point can represent any character.
virtualKey int The value representing the virtual key.

Virtual keys are non-ASCII keys represented by the following key codes:

VAL_FWD_DELETE_VKEY
VAL_BACKSPACE_VKEY
VAL_ESC_VKEY
VAL_TAB_VKEY
VAL_ENTER_VKEY
VAL_UP_ARROW_VKEY
VAL_DOWN_ARROW_VKEY
VAL_LEFT_ARROW_VKEY
VAL_RIGHT_ARROW_VKEY
VAL_INSERT_VKEY
VAL_HOME_VKEY
VAL_END_VKEY
VAL_PAGE_UP_VKEY
VAL_PAGE_DOWN_VKEY
VAL_F1_VKEY
VAL_F2_VKEY
VAL_F3_VKEY
VAL_F4_VKEY
VAL_F5_VKEY
VAL_F6_VKEY
VAL_F7_VKEY
VAL_F8_VKEY
VAL_F9_VKEY
VAL_F10_VKEY
VAL_F11_VKEY
VAL_F12_VKEY

modifiers int The value representing a modifier key.

A modifier key is a <Shift> key, <Alt> key, or <Ctrl> key.

The following constants represent the modifier key:

VAL_SHIFT_MODIFIER
VAL_UNDERLINE_MODIFIER
VAL_MENUKEY_MODIFIER
VAL_SHIFT_AND_MENUKEY

Return Value

Name Type Description
packedKeyCodeUnicode KeyCodeUnicode The value representing the key pressed by the user.

This value is formed by packing a Unicode code point, a virtual key, and a modifier key.

Additional Information

Library: Utility Library

Include file: utility.h

LabWindows/CVI compatibility: LabWindows/CVI 2020 and later

Examples

Refer to the following examples that use the PackKeyCodeUnicode function:

  • userint\FakeKeystrokeUnicode.cws

    Open example
  • utility\getkeyunicode.cws

    Open example
Was this information helpful?