KeyEvent

Keyboard event

Constructors

this
this(KeyAction action, uint keyCode, uint flags, dstring text)

create key event

Members

Properties

action
KeyAction action [@property getter]

key action (KeyDown, KeyUp, Text, Repeat)

flags
uint flags [@property getter]

flags (shift, ctrl, alt...) - KeyFlag enum

hasModifiers
bool hasModifiers [@property getter]

returns true if any modifier flag is set

keyCode
uint keyCode [@property getter]

key code (usually from KeyCode enum)

modifiers
uint modifiers [@property getter]

returns modifier flags filtered for KeyFlag.Control | KeyFlag.Alt | KeyFlag.Menu | KeyFlag.Shift only

noModifiers
bool noModifiers [@property getter]

returns true if no modifier flags are set

text
dstring text [@property getter]

entered text, for Text action

toString
string toString [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_action
KeyAction _action;

action

_flags
uint _flags;

key flags bit set, usually combined from KeyFlag enum

_keyCode
uint _keyCode;

key code, usually from KeyCode enum

_text
dstring _text;

entered text

Meta