Skip to main content

Module Keybinding

Module Keybinding 

Source
Expand description

§Keybinding (Tauri command surface)

Bridges keyboard-shortcut UI requests from Sky into the KeybindingProvider registry. Five wire-bound commands, each in its own file (file name = Tauri command identifier per the Naming-Convention exception):

  • GetResolvedKeybinding::GetResolvedKeybinding - final resolved bindings after merging defaults + extension contributions + user.
  • GetUserKeybindings::GetUserKeybindings - user overrides (stub).
  • RegisterExtensionKeybindings::RegisterExtensionKeybindings (stub).
  • UnregisterExtensionKeybindings::UnregisterExtensionKeybindings (stub).
  • CheckKeybindingConflicts::CheckKeybindingConflicts - chord overlap detection (stub).

Errors propagate as Result<Value, String> for direct frontend display.

VS Code reference: vs/workbench/services/keybinding/browser/keybindingService.ts, vs/platform/keybinding/common/keybindingResolver.ts.

TODO: weighted resolution (user > extension > default), persistence to ApplicationState, when-clause contexts, chord (multi-stroke) sequences, platform-specific bindings, conflict-resolution UI.

Modules§

CheckKeybindingConflicts
Tauri command - detect chord-sequence overlaps in the current keybinding registry. Stub returns no conflicts; pending real implementation that scans the resolved set and reports source + command for each clash.
GetResolvedKeybinding
Tauri command - fetch the final resolved keybindings (default + extension contributions + user overrides, weighted) for the keyboard shortcuts UI.
GetUserKeybindings
Tauri command - return user-defined keybinding overrides. Stub returns an empty array; pending persistence layer wired through KeybindingProvider.
RegisterExtensionKeybindings
Tauri command - register keybindings contributed by an extension. Stub returns success; pending real implementation that validates, checks permissions, persists to ApplicationState, and updates the resolution cache.
UnregisterExtensionKeybindings
Tauri command - remove keybindings registered by a given extension. Stub returns success; pending real implementation that filters by source identifier and clears the affected resolution cache.