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.
KeyboardEvent(String type, [bool bubbles = false]) : super(type, bubbles);
Properties
final bool altKey #
bool get altKey => _altKey;
final bool bubbles #
bool get bubbles => _bubbles;
final bool captures #
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;
EventDispatcher get currentTarget => _currentTarget;
final int eventPhase #
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;
bool get stopsImmediatePropagation => _stopsImmediatePropagation;
final bool stopsPropagation #
bool get stopsPropagation => _stopsPropagation;
EventDispatcher get target => _target;
final String type #
String get type => _type;
Methods
void stopImmediatePropagation() {
_stopsPropagation = true;
_stopsImmediatePropagation = true;
}
void stopPropagation() #
void stopPropagation() {
_stopsPropagation = true;
}