Dart DocumentationstagexlKeyboardEvent

KeyboardEvent class

class KeyboardEvent extends Event {

 static const String KEY_DOWN = "keyDown";
 static const String KEY_UP = "keyUp";

 //-------------------------------------------------------------------------------------------------

 bool _altKey = false;
 bool _ctrlKey = false;
 bool _shiftKey = false;
 bool _commandKey = false;     // Not supported
 bool _controlKey = false;     // Not supported

 int _charCode = 0;
 int _keyCode = 0;
 int _keyLocation = 0;

 KeyboardEvent(String type, [bool bubbles = false]) : super(type, bubbles);

 //-------------------------------------------------------------------------------------------------

 bool get altKey => _altKey;
 bool get ctrlKey => _ctrlKey;
 bool get shiftKey => _shiftKey;
 bool get commandKey => _commandKey;
 bool get controlKey => _controlKey;

 int get charCode => _charCode;
 int get keyCode => _keyCode;
 int get keyLocation => _keyLocation;
}

Extends

Event > KeyboardEvent

Static Properties

const String KEY_DOWN #

static const String KEY_DOWN = "keyDown"

const String KEY_UP #

static const String KEY_UP = "keyUp"

Constructors

new KeyboardEvent(String type, [bool bubbles = false]) #

Creates a new Object instance.

Object instances have no meaningful state, and are only useful through their identity. An Object instance is equal to itself only.

docs inherited from Object
KeyboardEvent(String type, [bool bubbles = false]) : super(type, bubbles);

Properties

final bool altKey #

bool get altKey => _altKey;

final bool bubbles #

inherited from Event
bool get bubbles => _bubbles;

final bool captures #

inherited from Event
bool get captures => true;

final int charCode #

int get charCode => _charCode;

final bool commandKey #

bool get commandKey => _commandKey;

final bool controlKey #

bool get controlKey => _controlKey;

final bool ctrlKey #

bool get ctrlKey => _ctrlKey;

final EventDispatcher currentTarget #

inherited from Event
EventDispatcher get currentTarget => _currentTarget;

final int eventPhase #

inherited from Event
int get eventPhase => _eventPhase;

final int keyCode #

int get keyCode => _keyCode;

final int keyLocation #

int get keyLocation => _keyLocation;

final bool shiftKey #

bool get shiftKey => _shiftKey;

final bool stopsImmediatePropagation #

inherited from Event
bool get stopsImmediatePropagation => _stopsImmediatePropagation;

final bool stopsPropagation #

inherited from Event
bool get stopsPropagation => _stopsPropagation;

final EventDispatcher target #

inherited from Event
EventDispatcher get target => _target;

final String type #

inherited from Event
String get type => _type;

Methods

void stopImmediatePropagation() #

inherited from Event
void stopImmediatePropagation() {
 _stopsPropagation = true;
 _stopsImmediatePropagation = true;
}

void stopPropagation() #

inherited from Event
void stopPropagation() {
 _stopsPropagation = true;
}