KeyboardSource class final Sources

Publishes physical keyboard state from HardwareKeyboard.

Listens globally and never consumes events, so shortcuts and text fields keep working; the text-entry guard, not focus, keeps typing from driving gameplay. Key repeats are ignored, keys already held when the source attaches are seeded, and every held key is released when the app loses focus or is hidden, so no key sticks down across an alt-tab.

Inheritance

Constructors

KeyboardSource()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

attach(InputSink sink) → void
Starts publishing into sink.
override
detach() → void
Stops publishing and releases platform listeners.
override
logicalKeyFor(KeyControl control) → LogicalKeyboardKey?
The logical key most recently produced by the physical key control, for labels that follow the user's keyboard layout. Null until the key has been pressed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
poll(double deltaSeconds) → void
Called at the start of each frame, before read windows advance, for backends that must be polled.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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