Class KeyEvent

Keyboard event

class KeyEvent;

Constructors

NameDescription
this (action, keyCode, flags, text) create key event

Fields

NameTypeDescription
_action KeyActionaction
_flags uintkey flags bit set, usually combined from KeyFlag enum
_keyCode uintkey code, usually from KeyCode enum
_text dstringentered text

Properties

NameTypeDescription
action[get] KeyActionkey action (KeyDown, KeyUp, Text, Repeat)
flags[get] uintflags (shift, ctrl, alt...) - KeyFlag enum
hasModifiers[get] boolreturns true if any modifier flag is set
keyCode[get] uintkey code (usually from KeyCode enum)
modifiers[get] uintreturns modifier flags filtered for KeyFlag.Control | KeyFlag.Alt | KeyFlag.Menu | KeyFlag.Shift only
noModifiers[get] boolreturns true if no modifier flags are set
text[get] dstringentered text, for Text action
toString[get] string