KeyEvent class final

A single key press from an interactive terminal in raw mode.

Either char is set for a printable character, or type identifies a special key. Modifiers are reported when the terminal sends them.

Constructors

KeyEvent({String? char, required KeyType type, bool shift = false, bool ctrl = false, bool alt = false})
const

Properties

alt bool
Whether Alt/Meta was held.
final
char String?
Printable character, if any. Null for special keys.
final
ctrl bool
Whether Ctrl was held.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shift bool
Whether Shift was held.
final
type KeyType
The key type.
final

Methods

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

Operators

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