Admin Production ni-theme
Current Publication

KeyPressEventIsLeadByte

LabWindows/CVI

KeyPressEventIsLeadByte

int KeyPressEventIsLeadByte (int eventData2);

Purpose

Call this function when you receive an EVENT_KEYPRESS in a panel or control callback to determine if the callback's eventData1 parameter contains the first byte of a two-byte character. If the callback's eventData1 parameter contains a lead byte, the trail byte will be in the next EVENT_KEYPRESS event for that panel or control. National Instruments recommends that you ignore EVENT_KEYPRESS events that contain the first byte of a two-byte character.

Refer to the GetKeyPressEventCharacter function reference for an example of how to use this and other key press event functions.

Parameters

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

Return Value

Name Type Description
isLeadByte int > 0 if the EVENT_KEYPRESS event is for a lead byte of a two-byte character.

0 if the EVENT_KEYPRESS event is not for a lead byte of a two-byte character.

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 KeyPressEventIsLeadByte function.