Dart Documentationchrome.inputKeyboardEvent

KeyboardEvent class

See http://www.w3.org/TR/DOM-Level-3-Events/#events-KeyboardEvent

class KeyboardEvent extends ChromeObject {
 KeyboardEvent({String type, String requestId, String key, String code, bool altKey, bool ctrlKey, bool shiftKey, bool capsLock}) {
   if (type != null) this.type = type;
   if (requestId != null) this.requestId = requestId;
   if (key != null) this.key = key;
   if (code != null) this.code = code;
   if (altKey != null) this.altKey = altKey;
   if (ctrlKey != null) this.ctrlKey = ctrlKey;
   if (shiftKey != null) this.shiftKey = shiftKey;
   if (capsLock != null) this.capsLock = capsLock;
 }
 KeyboardEvent.fromProxy(JsObject jsProxy): super.fromProxy(jsProxy);

 /**
  * One of keyup or keydown.
  * enum of `keyup`, `keydown`
  */
 String get type => jsProxy['type'];
 set type(String value) => jsProxy['type'] = value;

 /**
  * The ID of the request.
  */
 String get requestId => jsProxy['requestId'];
 set requestId(String value) => jsProxy['requestId'] = value;

 /**
  * Value of the key being pressed
  */
 String get key => jsProxy['key'];
 set key(String value) => jsProxy['key'] = value;

 /**
  * Value of the physical key being pressed. The value is not affected by
  * current keyboard layout or modifier state.
  */
 String get code => jsProxy['code'];
 set code(String value) => jsProxy['code'] = value;

 /**
  * Whether or not the ALT key is pressed.
  */
 bool get altKey => jsProxy['altKey'];
 set altKey(bool value) => jsProxy['altKey'] = value;

 /**
  * Whether or not the CTRL key is pressed.
  */
 bool get ctrlKey => jsProxy['ctrlKey'];
 set ctrlKey(bool value) => jsProxy['ctrlKey'] = value;

 /**
  * Whether or not the SHIFT key is pressed.
  */
 bool get shiftKey => jsProxy['shiftKey'];
 set shiftKey(bool value) => jsProxy['shiftKey'] = value;

 /**
  * Whether or not the CAPS_LOCK is enabled.
  */
 bool get capsLock => jsProxy['capsLock'];
 set capsLock(bool value) => jsProxy['capsLock'] = value;
}

Extends

ChromeObject > KeyboardEvent

Constructors

new KeyboardEvent({String type, String requestId, String key, String code, bool altKey, bool ctrlKey, bool shiftKey, bool capsLock}) #

Create a new instance of a ChromeObject, which creates and delegates to a JsObject proxy.

docs inherited from ChromeObject
KeyboardEvent({String type, String requestId, String key, String code, bool altKey, bool ctrlKey, bool shiftKey, bool capsLock}) {
 if (type != null) this.type = type;
 if (requestId != null) this.requestId = requestId;
 if (key != null) this.key = key;
 if (code != null) this.code = code;
 if (altKey != null) this.altKey = altKey;
 if (ctrlKey != null) this.ctrlKey = ctrlKey;
 if (shiftKey != null) this.shiftKey = shiftKey;
 if (capsLock != null) this.capsLock = capsLock;
}

new KeyboardEvent.fromProxy(JsObject jsProxy) #

Create a new instance of a ChromeObject, which delegates to the given JsObject proxy.

docs inherited from ChromeObject
KeyboardEvent.fromProxy(JsObject jsProxy): super.fromProxy(jsProxy);

Properties

bool altKey #

Whether or not the ALT key is pressed.

bool get altKey => jsProxy['altKey'];
set altKey(bool value) => jsProxy['altKey'] = value;

bool capsLock #

Whether or not the CAPS_LOCK is enabled.

bool get capsLock => jsProxy['capsLock'];
set capsLock(bool value) => jsProxy['capsLock'] = value;

String code #

Value of the physical key being pressed. The value is not affected by current keyboard layout or modifier state.

String get code => jsProxy['code'];
set code(String value) => jsProxy['code'] = value;

bool ctrlKey #

Whether or not the CTRL key is pressed.

bool get ctrlKey => jsProxy['ctrlKey'];
set ctrlKey(bool value) => jsProxy['ctrlKey'] = value;

final jsProxy #

inherited from ChromeObject
final dynamic jsProxy

String key #

Value of the key being pressed

String get key => jsProxy['key'];
set key(String value) => jsProxy['key'] = value;

String requestId #

The ID of the request.

String get requestId => jsProxy['requestId'];
set requestId(String value) => jsProxy['requestId'] = value;

bool shiftKey #

Whether or not the SHIFT key is pressed.

bool get shiftKey => jsProxy['shiftKey'];
set shiftKey(bool value) => jsProxy['shiftKey'] = value;

String type #

One of keyup or keydown. enum of keyup, keydown

String get type => jsProxy['type'];
set type(String value) => jsProxy['type'] = value;

Methods

JsObject toJs() #

inherited from ChromeObject
JsObject toJs() => jsProxy;

String toString() #

inherited from ChromeObject

Returns a string representation of this object.

docs inherited from Object
String toString() => jsProxy.toString();