KeyboardSnapshot class final

An immutable, frame-latched view of the session keyboard (RFC 0020 §5.6/§7): what is held, and which identities transitioned since the previous latch. Edges are non-consuming and expire at the next latch whether or not anyone read them; a paused consumer gets no backlog.

Properties

frameNumber → int
The latch ordinal of the last input change this snapshot reflects.
final
hashCode → int
The hash code for this object.
no setterinherited
positionsPressed → Set<KeyPosition>
Positional identities currently down (presses that carried one).
no setter
pressed → Set<KeyCode>
Logical identities currently down.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sessionGeneration → int
Bumped when the input session is replaced (driver swap, reconnect); all prior state and edges are invalidated with it.
final

Methods

isHeld(KeySelector selector) → bool
Whether selector's key is down right now (per-press §13.3 matching: positional when the press carried a position, else US-twin logical).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override
wasPressed(KeySelector selector) → bool
Whether selector's key transitioned down since the previous latch. Non-consuming; survives a press+release that lands entirely between two frames (the fixed-step-simulation contract, §7.2).
wasReleased(KeySelector selector) → bool
Whether selector's key transitioned up since the previous latch.

Operators

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

Static Properties

empty → KeyboardSnapshot
A snapshot with nothing held and no edges — what any consumer sees before the first latch, or on a surface that reports no held state.
no setter

Static Methods

debugTakeSampledSelectors() → Set<KeySelector>
Drains the selectors sampled since the last call. Debug-only: in release the recording below is compiled out and this is always empty.