W3cubDocs

/Dart 2

KeyboardEvent class

An event that describes user interaction with the keyboard.

The type of the event identifies what kind of interaction occurred.

See also:

Inheritance
Implementers
Annotations
  • @Native("KeyboardEvent")

Constructors

KeyboardEvent(String type, { Window view, bool canBubble: true, bool cancelable: true, int location, int keyLocation, bool ctrlKey: false, bool altKey: false, bool shiftKey: false, bool metaKey: false })
factory
Programmatically create a KeyboardEvent. [...]

Properties

altKeybool
final
charCodeint
final
codeString
final
ctrlKeybool
final
isComposingbool
final
keyString
final
keyCodeint
final
locationint
final
metaKeybool
final
repeatbool
final
shiftKeybool
final
whichint
read-only
bubblesbool
final, inherited
cancelablebool
final, inherited
composedbool
final, inherited
currentTargetEventTarget
read-only, inherited
defaultPreventedbool
final, inherited
detailint
final, inherited
eventPhaseint
final, inherited
hashCodeint
read-only, inherited
The hash code for this object. [...]
isTrustedbool
final, inherited
matchingTargetElement
read-only, inherited
A pointer to the element whose CSS selector matched within which an event was fired. If this Event was not associated with any Event delegation, accessing this value will throw an UnsupportedError.
pathList<EventTarget>
read-only, inherited
runtimeTypeType
read-only, inherited
A representation of the runtime type of the object.
sourceCapabilitiesInputDeviceCapabilities
final, inherited
targetEventTarget
read-only, inherited
timeStampnum
final, inherited
typeString
final, inherited
viewWindowBase
read-only, inherited

Methods

getModifierState(String keyArg) → bool
composedPath() → List<EventTarget>
inherited
noSuchMethod(Invocation invocation) → dynamic
inherited
Invoked when a non-existent method or property is accessed. [...]
preventDefault() → void
inherited
stopImmediatePropagation() → void
inherited
stopPropagation() → void
inherited
toString() → String
inherited
Returns a string representation of this object.

Operators

operator ==(dynamic other) → bool
inherited
The equality operator. [...]

Constants

DOM_KEY_LOCATION_LEFT → const int
0x01
DOM_KEY_LOCATION_NUMPAD → const int
0x03
DOM_KEY_LOCATION_RIGHT → const int
0x02
DOM_KEY_LOCATION_STANDARD → const int
0x00

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.5.0/dart-html/KeyboardEvent-class.html