ShortcutSurface class final
A named, stackable input layer (route, dialog, editor chrome, …).
Dispatch order inside a surface:
- bindings sequence/single engine (if non-empty)
- onMessage custom handler
- nested interceptor
Constructors
-
ShortcutSurface({required String id, bool exclusive = false, List<
ShortcutBinding> bindings = const [], Duration? sequenceTimeout, ProgramInterceptor? interceptor, KeymapLayerResult onMessage(Msg msg)?, Map<String, Object?> meta = const {}}) - Creates a surface.
Properties
-
bindings
→ List<
ShortcutBinding> -
Shortcut catalog for this surface (singles + sequences).
final
- exclusive → bool
-
When
true, an unhandled message is dropped (no fallthrough).final - hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Stable id for push/pop/replace (e.g.
session,confirm-dialog).final - interceptor → ProgramInterceptor?
-
Optional nested interceptor (e.g. legacy KeyChordInterceptor).
final
- isSequencePending → bool
-
Whether a multi-key sequence is pending on this surface.
no setter
-
meta
→ Map<
String, Object?> -
Optional metadata (title, group, …) for discovery UIs.
final
- onMessage → KeymapLayerResult Function(Msg msg)?
-
Explicit layer handler after bindings.
final
- pending → KeymapPendingSequence?
-
Pending sequence snapshot, or
null.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sequenceTimeout → Duration?
-
Auto-cancel pending sequences after this duration (
null= wait forever).final
Methods
-
attachSend(
void send(Msg msg)?) → void -
Bind
sendfor sequence timeouts (called from hubonStart/ push). -
copyWith(
{String? id, bool? exclusive, List< ShortcutBinding> ? bindings, Duration? sequenceTimeout, ProgramInterceptor? interceptor, KeymapLayerResult onMessage(Msg msg)?, Map<String, Object?> ? meta}) → ShortcutSurface -
handle(
Msg msg) → KeymapLayerResult -
Dispatch
msgthrough this surface. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reset(
) → void - Clear pending multi-key state and nested resettables.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited