Keyboard class abstract interface

A keyboard that can be used to input text or detect key presses.

Constructors

Keyboard()
const
Keyboard.fromBuffer(BufferedKeys buffer)
Creates a new keyboard instance using the provided buffer.
factory
Keyboard.fromStdin([Stdin? stdin])
Creates a new keyboard instance that reads from the standard input stream.
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
isAnyPressed → bool
Whether any key is currently pressed.
no setter
pressed → Iterable<List<Key>>
All currently pressed key combinations in the order they were pressed.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() → void
Clears the current state of the keyboard.
close() → Future<void>
Closes the keyboard and releases any resources associated with it.
isPressed(Key a, [Key b, Key c, Key d, Key e, Key f]) → bool
Returns true if a was pressed since the last call to clear.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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