RawKeyEventDataAndroid class Null safety

Platform-specific key event data for Android.

This object contains information about key events obtained from Android's KeyEvent interface.

See also:

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

Constructors

RawKeyEventDataAndroid({int flags = 0, int codePoint = 0, int plainCodePoint = 0, int keyCode = 0, int scanCode = 0, int metaState = 0, int eventSource = 0, int vendorId = 0, int productId = 0, int deviceId = 0, int repeatCount = 0})
Creates a key event data structure specific for Android.
const

Properties

codePoint → int
The Unicode code point represented by the key event, if any.
final
deviceId → int
The ID of the device that produced the event.
final
eventSource → int
The source of the event.
final
flags → int
The current set of additional flags for this event.
final
hashCode → int
The hash code for this object.
read-onlyoverride
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-onlyinherited
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-onlyinherited
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-onlyinherited
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-onlyinherited
keyCode → int
The hardware key code corresponding to this key event.
final
keyLabel → String
Returns the Unicode string representing the label on this key.
read-onlyoverride
logicalKey → LogicalKeyboardKey
Returns an object representing the logical key that was pressed.
read-onlyoverride
metaState → int
The modifiers that were present when the key event occurred.
final
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-onlyinherited
physicalKey → PhysicalKeyboardKey
Returns an object representing the physical location of this key on a QWERTY keyboard.
read-onlyoverride
plainCodePoint → int
The Unicode code point represented by the key event, if any, without regard to any modifier keys which are currently pressed.
final
productId → int
The product ID of the device that produced the event.
final
repeatCount → int
The repeat count of the event.
final
runtimeType → Type
A representation of the runtime type of the object.
read-onlyinherited
scanCode → int
The hardware scan code id corresponding to this key event.
final
vendorId → int
The vendor ID of the device that produced the event.
final

Methods

debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
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
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
shouldDispatchEvent() → bool
Whether a key down event, and likewise its accompanying key up event, should be dispatched.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringShort() → String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
override

Constants

modifierAlt → const int
This mask is used to check the metaState field to test whether one of the ALT modifier keys is pressed.
0x02
modifierCapsLock → const int
This mask is used to check the metaState field to test whether the CAPS LOCK modifier key is on.
0x100000
modifierControl → const int
This mask is used to check the metaState field to test whether one of the CTRL modifier keys is pressed.
0x1000
modifierFunction → const int
This mask is used to check the metaState field to test whether the Function modifier key (Fn) is pressed.
0x08
modifierLeftAlt → const int
This mask is used to check the metaState field to test whether the left ALT modifier key is pressed.
0x10
modifierLeftControl → const int
This mask is used to check the metaState field to test whether the left CTRL modifier key is pressed.
0x2000
modifierLeftMeta → const int
This mask is used to check the metaState field to test whether the left META modifier key is pressed.
0x20000
modifierLeftShift → const int
This mask is used to check the metaState field to test whether the left SHIFT modifier key is pressed.
0x40
modifierMeta → const int
This mask is used to check the metaState field to test whether one of the META modifier keys is pressed.
0x10000
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.
0x200000
modifierRightAlt → const int
This mask is used to check the metaState field to test whether the right ALT modifier key is pressed.
0x20
modifierRightControl → const int
This mask is used to check the metaState field to test whether the right CTRL modifier key is pressed.
0x4000
modifierRightMeta → const int
This mask is used to check the metaState field to test whether the right META modifier key is pressed.
0x40000
modifierRightShift → const int
This mask is used to check the metaState field to test whether the right SHIFT modifier key is pressed.
0x80
modifierScrollLock → const int
This mask is used to check the metaState field to test whether the SCROLL LOCK modifier key is on.
0x400000
modifierShift → const int
This mask is used to check the metaState field to test whether one of the SHIFT modifier keys is pressed.
0x01
modifierSym → const int
This mask is used to check the metaState field to test whether the SYM modifier key is pressed.
0x04