RawKeyEvent class

Defines the interface for raw key events.

Raw key events pass through as much information as possible from the underlying platform's key events, which allows them to provide a high level of fidelity but a low level of portability.

The event also provides an abstraction for the physicalKey and the logicalKey, describing the physical location of the key, and the logical meaning of the key, respectively. These are more portable representations of the key events, and should produce the same results regardless of platform.

See also:

Inheritance
Implementers
Annotations
  • @immutable

Constructors

RawKeyEvent({@required RawKeyEventData data, String character })
Initializes fields for subclasses, and provides a const constructor for const subclasses.
const
RawKeyEvent.fromMessage(Map<String, dynamic> message)
Creates a concrete RawKeyEvent class from a message in the form received on the SystemChannels.keyEvent channel.
factory

Properties

character String
Returns the Unicode character (grapheme cluster) completed by this keystroke, if any. [...]
final
data RawKeyEventData
Platform-specific information about the key event.
final
isAltPressed bool
Returns true if a ALT modifier key is pressed, regardless of which side of the keyboard it is on. [...]
read-only
isControlPressed bool
Returns true if a CTRL modifier key is pressed, regardless of which side of the keyboard it is on. [...]
read-only
isMetaPressed bool
Returns true if a META modifier key is pressed, regardless of which side of the keyboard it is on. [...]
read-only
isShiftPressed bool
Returns true if a SHIFT modifier key is pressed, regardless of which side of the keyboard it is on. [...]
read-only
logicalKey LogicalKeyboardKey
Returns an object representing the logical key that was pressed. [...]
read-only
physicalKey PhysicalKeyboardKey
Returns an object representing the physical location of this key. [...]
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
override
isKeyPressed(LogicalKeyboardKey key) bool
Returns true if the given KeyboardKey is pressed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
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.debug }) String
Returns 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 ==(dynamic other) bool
The equality operator. [...]
inherited