RawKeyEventDataWeb class

Platform-specific key event data for Web.

See also:

  • RawKeyboard, which uses this interface to expose key data.
Inheritance
Annotations
  • @immutable

Constructors

RawKeyEventDataWeb({@required String code, @required String key, int metaState: modifierNone})
Creates a key event data structure specific for Web. [...]
const

Properties

code String
The KeyboardEvent.code corresponding to this event. [...]
final
key String
The KeyboardEvent.key corresponding to this event. [...]
final
keyLabel String
Returns the Unicode string representing the label on this key. [...]
read-only, override
logicalKey LogicalKeyboardKey
Returns an object representing the logical key that was pressed. [...]
read-only, override
metaState int
The modifiers that were present when the key event occurred. [...]
final
physicalKey PhysicalKeyboardKey
Returns an object representing the physical location of this key on a QWERTY keyboard. [...]
read-only, override
hashCode int
The hash code for this object. [...]
read-only, inherited
isAltPressed bool
Returns true if a ALT modifier key was pressed at the time of this event, regardless of which side of the keyboard it is on. [...]
read-only, inherited
isControlPressed bool
Returns true if a CTRL modifier key was pressed at the time of this event, regardless of which side of the keyboard it is on. [...]
read-only, inherited
isMetaPressed bool
Returns true if a META modifier key was pressed at the time of this event, regardless of which side of the keyboard it is on. [...]
read-only, inherited
isShiftPressed bool
Returns true if a SHIFT modifier key was pressed at the time of this event, regardless of which side of the keyboard it is on. [...]
read-only, inherited
modifiersPressed Map<ModifierKey, KeyboardSide>
Returns a map of modifier keys that were pressed at the time of this event, and the keyboard side or sides that the key was on.
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

getModifierSide(ModifierKey key) KeyboardSide
Returns a KeyboardSide enum value that describes which side or sides of the given keyboard modifier key were pressed at the time of this event. [...]
override
isModifierPressed(ModifierKey key, {KeyboardSide side: KeyboardSide.any}) bool
Returns true if the given ModifierKey was pressed at the time of this event. [...]
override
toString() String
Returns a string representation of this object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited

Operators

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

Constants

modifierAlt → const int
This mask is used to check the metaState field to test whether one of the ALT modifier keys is pressed. [...]
2
modifierCapsLock → const int
This mask is used to check the metaState field to test whether the CAPS LOCK modifier key is on. [...]
32
modifierControl → const int
This mask is used to check the metaState field to test whether one of the CTRL modifier keys is pressed. [...]
4
modifierMeta → const int
This mask is used to check the metaState field to test whether one of the META modifier keys is pressed. [...]
8
modifierNone → const int
No modifier keys are pressed in the metaState field. [...]
0
modifierNumLock → const int
This mask is used to check the metaState field to test whether the NUM LOCK modifier key is on. [...]
16
modifierScrollLock → const int
This mask is used to check the metaState field to test whether the SCROLL LOCK modifier key is on. [...]
64
modifierShift → const int
This mask is used to check the metaState field to test whether one of the SHIFT modifier keys is pressed. [...]
1