GetKeyPressEventCharacter

int GetKeyPressEventCharacter (int eventData2);

Purpose

Call this function when you receive an EVENT_KEYPRESS in a panel or control callback to get the character that was pressed. This function returns 0 if the callback's eventData1 parameter contains a virtual key code instead of a character.

Parameters

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

Return Value

Name Type Description
character int A positive character value if the EVENT_KEYPRESS event is for a single-byte character, the lead byte of a two-byte character, or the trail byte of two-byte character. If the event is for a lead byte, the character value is only the lead byte of the character. If the event is for a trail byte, the character value is the complete two-byte character.

0 if the EVENT_KEYPRESS event is not for a single-byte character, the lead byte of a two-byte character, or the trail byte of two-byte character. Negative values indicate that an error occurred.