KeybindingResolver class

Keybinding resolver — resolves keystrokes to actions with chord support, conflict detection, and context-aware binding lookup.

Constructors

KeybindingResolver()

Properties

bindings List<ParsedBinding>
The current registered bindings.
no setter
hashCode int
The hash code for this object.
no setterinherited
isChordPending bool
Whether a chord is in progress.
no setter
pendingChord List<ParsedKeystroke>?
The current pending chord keystrokes (null if not in a chord).
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancelChord() → void
Cancel any pending chord.
clearBindings() → void
Clear all bindings.
findConflicts(String keyString, KeybindingContext context) List<ParsedBinding>
Find conflicting bindings for a given keystroke in a context.
getBindingDisplayText(String action, KeybindingContext context) String?
Get display text for an action in a context (e.g. "ctrl+t"). Searches in reverse order so user overrides take precedence.
getBindingDisplayTextPlatform(String action, KeybindingContext context, {String platform = 'linux'}) String?
Get display text with platform-appropriate formatting.
getBindingsForContext(KeybindingContext context) List<ParsedBinding>
Get all bindings for a context.
getBindingsForContexts(List<KeybindingContext> contexts) List<ParsedBinding>
Get all bindings for multiple contexts (union).
getShortcutDisplay(String action, KeybindingContext context, String fallback) String
Get shortcut display text with fallback.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerBindings(List<ParsedBinding> bindings) → void
Register bindings (later registrations take priority).
resolveKey(ParsedKeystroke keystroke, List<KeybindingContext> activeContexts) ResolveResult
Resolve a keystroke in a list of active contexts. Pure single-keystroke matching — last registered binding wins.
resolveKeyWithChordState(ParsedKeystroke keystroke, List<KeybindingContext> activeContexts) ChordResolveResult
Resolve a keystroke with chord state support. Handles multi-keystroke chord bindings like "ctrl+k ctrl+s".
setBindings(List<ParsedBinding> bindings) → void
Replace all bindings with a new set.
setPendingChord(List<ParsedKeystroke>? pending) → void
Set the pending chord state externally (for context-based coordination).
toString() String
A string representation of this object.
inherited

Operators

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