Skip to content

Add configurable next/previous pane keybindings#84

Open
thdxg wants to merge 1 commit into
mainfrom
claude/quirky-bose-900b06
Open

Add configurable next/previous pane keybindings#84
thdxg wants to merge 1 commit into
mainfrom
claude/quirky-bose-900b06

Conversation

@thdxg

@thdxg thdxg commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Closes #83.

Why

⌘] / ⌘[ cycle through projects in Macterm, so the issue asked for a separate, rebindable way to cycle focus through the panes within the current tab.

What changed

Adds Next Pane / Previous Pane actions following the existing hotkey patterns:

  • HotkeyAction — new nextPane / previousPane cases, defaulting to "none" (unbound, like splitAuto) so they don't clash with any existing shortcut. The user binds them in Settings.
  • AppCommand — matching "Next Pane" / "Previous Pane" commands in the Panes category, linked back to the hotkey actions. This single registration surfaces them in the command palette, menu bar, and Settings keymaps automatically.
  • AppState.cyclePane(forward:projectID:) — walks splitRoot.allPanes() (tree order) from the focused pane with modulo wraparound; no-op for a single pane. Focus restoration to the NSView rides the existing TerminalPane.updateNSView path, same as directional focus.
  • Wired through AppCommandActions and Responders.

Notes for reviewers

  • The actions are intentionally unbound by default — the issue specifically wanted users to set their own keymap rather than impose new defaults that could collide. They appear ready to bind under the Panes section in Settings.

Tests

Added 4 AppStateTests cases: forward advance in tree order, forward/backward wrap, and single-pane no-op. mise run test, format, and lint all pass.

⌘] / ⌘[ cycle projects, so issue #83 asks for a separate, rebindable
way to cycle focus through the panes within the current tab. Adds
nextPane/previousPane actions (unbound by default) that walk the active
tab's panes in tree order with wraparound; the palette, menu bar, and
Settings keymaps pick them up automatically via AppCommand.allCases.

Closes #83
@github-actions github-actions Bot added area:state AppState, models, persistence area:hotkeys Key routing, hotkeys area:tests Test changes labels Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:hotkeys Key routing, hotkeys area:state AppState, models, persistence area:tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add next/previous pane keymap

1 participant