Skip to content

T-IMOO-pane-toggle-keybindings

Status: closed/done · Impact: medium · Complexity: medium

Give the shell’s panes keyboard toggle/focus (e.g. Ctrl+1–4) without a second global listener: panes register through the existing command registry so dispatch and the command palette stay coordinated.

LocationRole today
packages/ts/shell/app/composables/useKeybindings.tsA single route-scoped window keydown dispatcher over usePlatform().commands, matching via utils/chords.ts.
packages/ts/panes/src/PaneGroup.vueExposes its controller (toggle/collapse/focus/resize) via defineExpose, but owns no keyboard.
packages/ts/shell/app/layouts/default.vueWill host the pane group (T-E078-layout-host-pane-shell); registers no pane commands.

The shell registers pane commands (shell.togglePane.secondary, shell.togglePane.aux, shell.focusPane.main, and so on) with keybindings through usePlatform(), so useKeybindings dispatches them like any command. Each command drives the layout-hosted PaneGroup controller. No new window listener; the commands are active only when the pane group is mounted.

  1. Capture the layout-hosted PaneGroup controller (its exposed ref) in the shell layout.
  2. Add usePaneCommands(controller) that registers toggle/focus commands with chords (Ctrl+1–4 or the determined convention) through usePlatform().
  3. Ensure the commands unregister or no-op when no pane group is mounted, and do not collide with the command palette or existing chords.
LocationKindChange
packages/ts/shell/app/composables/usePaneCommands.tsnewregister pane toggle/focus commands + chords
packages/ts/shell/app/layouts/default.vuemodifywire the pane-group controller into usePaneCommands
  • AC-1: The configured chord toggles/focuses each pane through the command registry, with no second window listener added.
  • AC-2: The bindings are inert when no pane group is mounted and do not shadow the command palette or existing chords.
  • AC-3: Pane commands are registered in usePlatform().commands (discoverable like other commands).

T-E078-layout-host-pane-shell


← Back to Tasks