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
read-only
bubblesbool?
read-only, inherited
cancelablebool?
read-only, inherited
charCodeint
read-only
codeString?
read-only
composedbool?
read-only, inherited
ctrlKeybool
read-only
currentTargetEventTarget?
read-only, inherited
defaultPreventedbool
read-only, inherited
detailint?
read-only, inherited
eventPhaseint
read-only, inherited
hashCodeint
read-only, inherited
The hash code for this object. [...]
isComposingbool?
read-only
isTrustedbool?
read-only, inherited
keyString?
read-only
keyCodeint
read-only
locationint
read-only
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.
metaKeybool
read-only
pathList<EventTarget>
read-only, inherited
repeatbool?
read-only
runtimeTypeType
read-only, inherited
A representation of the runtime type of the object.
shiftKeybool
read-only
sourceCapabilitiesInputDeviceCapabilities?
read-only, inherited
targetEventTarget?
read-only, inherited
timeStampnum?
read-only, inherited
typeString
read-only, inherited
viewWindowBase?
read-only, inherited
whichint?
read-only

Methods

composedPath() → List<EventTarget>
inherited
getModifierState(String keyArg) → bool
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
A string representation of this object. [...]

Operators

operator ==(Object 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.13.0/dart-html/KeyboardEvent-class.html