KeyDownEvent class
An event indicating that the user has pressed a key down on the keyboard.
See also:
- KeyRepeatEvent, a key event representing the user holding a key, causing repeated events.
- KeyUpEvent, a key event representing the user releasing a key.
- HardwareKeyboard, which produces this event.
Constructors
- KeyDownEvent({required PhysicalKeyboardKey physicalKey, required LogicalKeyboardKey logicalKey, String? character, required Duration timeStamp, bool synthesized = false, KeyEventDeviceType deviceType = ui.KeyEventDeviceType.keyboard})
-
Creates a key event that represents the user pressing a key.
const
Properties
- character → String?
-
Returns the Unicode character (grapheme cluster) completed by this
keystroke, if any.
finalinherited
- deviceType → KeyEventDeviceType
-
The source device type for the key event.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- logicalKey → LogicalKeyboardKey
-
Returns an object representing the logical key that was pressed.
finalinherited
- physicalKey → PhysicalKeyboardKey
-
Returns an object representing the physical location of this key.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- synthesized → bool
-
Whether this event is synthesized by Flutter to synchronize key states.
finalinherited
- timeStamp → Duration
-
Time of event, relative to an arbitrary start point.
finalinherited
Methods
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent 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.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.
inherited