keyevent noModifiers property

This commit is contained in:
Vadim Lopatin 2016-10-14 13:11:19 +03:00
parent 34d2d5afb1
commit d8d3043dac
1 changed files with 4 additions and 0 deletions

View File

@ -1236,6 +1236,10 @@ class KeyEvent {
@property uint flags() { return _flags; } @property uint flags() { return _flags; }
/// entered text, for Text action /// entered text, for Text action
@property dstring text() { return _text; } @property dstring text() { return _text; }
/// returns true if no modifier flags are set
@property bool noModifiers() { return (_flags & (KeyFlag.Control | KeyFlag.Alt | KeyFlag.Menu | KeyFlag.Shift)) == 0; }
/// create key event /// create key event
this(KeyAction action, uint keyCode, uint flags, dstring text = null) { this(KeyAction action, uint keyCode, uint flags, dstring text = null) {
_action = action; _action = action;