KeyboardEvent class

objects describe a user interaction with the keyboard; each event describes a single interaction between the user and a key (or combination of a key with modifier keys) on the keyboard. The event type (keydown, keypress, or keyup) identifies what kind of keyboard activity occurred.

Note: events just indicate what interaction the user had with a key on the keyboard at a low level, providing no contextual meaning to that interaction. When you need to handle text input, use the input event instead. Keyboard events may not be fired if the user is using an alternate means of entering text, such as a handwriting system on a tablet or graphics tablet.

Event

UIEvent

KeyboardEvent

Implemented types
Available extensions
Annotations
  • @JS()
  • @staticInterop

Constructors

KeyboardEvent(String type, [KeyboardEventInit? eventInitDict])
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

domKeyLocationLeft int
no setter
domKeyLocationNumpad int
no setter
domKeyLocationRight int
no setter
domKeyLocationStandard int
no setter