Facebook Twitter YouTube

struct KeyboardEventData

Defined in:  TSTypes.h
The KeyboardEventData structure contains information about a keyboard event.
Definition

struct KeyboardEventData

Data Members
EventType       eventType; The type of keyboard event.
unsigned_int32  keyCode; The Unicode value for the character associated with the event.
unsigned_int32  modifierKeys; The modifier keys associated with the event.
Description
The KeyboardEventData structure contains the type of event, the Unicode character, and information about modifiers keys for a keyboard event. The keyCode field is set to one of the following values if a special key is pressed or released.
kKeyCodeEnter The enter key (return key on the Mac).
kKeyCodeEscape The escape key.
kKeyCodeTab The tab key.
kKeyCodeLeftArrow The left arrow key.
kKeyCodeRightArrow The right arrow key.
kKeyCodeUpArrow The up arrow key.
kKeyCodeDownArrow The down arrow key.
kKeyCodePageUp The page up key.
kKeyCodePageDown The page down key.
kKeyCodeHome The home key.
kKeyCodeEnd The end key.
kKeyCodeDelete The delete key.
kKeyCodeBackspace The backspace key.
kKeyCodeF1 The F1 key.
kKeyCodeF2 The F2 key.
kKeyCodeF3 The F3 key.
kKeyCodeF4 The F4 key.
kKeyCodeF5 The F5 key.
kKeyCodeF6 The F6 key.
kKeyCodeF7 The F7 key.
kKeyCodeF8 The F8 key.
kKeyCodeF9 The F9 key.
kKeyCodeF10 The F10 key.
kKeyCodeF11 The F11 key.
kKeyCodeF12 The F12 key.
Special keys always have codes in the ranges [0x01, 0x1F] or [0x80, 0x9F], and keyboard event handlers should not attempt to handle codes in these ranges as ordinary characters.

The modifierKeys field can be a combination (through logical OR) of the following constants.
kModifierKeyShift The shift key was held down.
kModifierKeyOption The alt key (option key on the Mac) was held down.
kModifierKeyCommand The control key (command key on the Mac) was held down.
See Also

MouseEventData