RawKeyboard class

An interface for listening to raw key events.

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

A RawKeyboard is useful for listening to raw key events and hardware buttons that are represented as keys. Typically used by games and other apps that use keyboards for purposes other than text entry.

See also:


keysPressed Set<LogicalKeyboardKey>
Returns the set of keys currently pressed.
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


addListener(ValueChanged<RawKeyEvent> listener) → void
Calls the listener every time the user presses or releases a key. [...]
removeListener(ValueChanged<RawKeyEvent> listener) → void
Stop calling the listener every time the user presses or releases a key. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toString() String
Returns a string representation of this object.


operator ==(dynamic other) bool
The equality operator. [...]

Static Properties

instance RawKeyboard
The shared instance of RawKeyboard.