Fix Ghostty keybindings for workspace navigation (#135)
Closes #135
Summary
- route Ghostty previous_tab/next_tab keybinds to cmux workspace navigation
- support Page Up/Page Down in shortcut recording, cmux.json parsing, matching, and schema docs
- add regression coverage for super+alt+arrow and ctrl+page_up/page_down Ghostty configs
Tests
- Not run locally per repository policy; CI will run the regression coverage.
[!NOTE]
Medium Risk
Changes global shortcut routing and Ghostty config integration; conflict rules with surface navigation must stay correct to avoid surprising tab/surface behavior.
Overview
Ghostty previous_tab / next_tab keybinds from the Ghostty config now drive cmux workspace prev/next tab when they do not collide with cmux’s own surface shortcuts (Cmd+Shift+[/]). Shortcut reload is renamed to refreshGhosttyNavigationShortcuts, loads those two triggers, maps Page Up/Down from Ghostty physical keys (with key codes 116/121), and refreshes on the MainActor.
Page Up and Page Down are supported end-to-end in the shortcut stack: recording, parsing, display, direct key-code matching, cmux.schema.json, and localized labels. Regression tests cover Ghostty tab routing (Cmd+Opt+arrows, Ctrl+Page Up/Down) and page-key parsing/recording.
Reviewed by Cursor Bugbot for commit 3da86d7c7574f0ee0a76ed81ed680aea7fe4a09d. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Routes Ghostty previous_tab/next_tab keybindings to cmux workspace navigation and adds first-class Page Up/Down support and labels. Fixes #135; keeps cmux surface shortcuts (Cmd+Shift+[/]) authoritative and runs Ghostty config reload/observers on the MainActor.
-
Bug Fixes
- Route Ghostty tab navigation (Cmd+Opt+←/→, Ctrl+PageUp/PageDown) to previous/next workspace without overriding cmux surface navigation.
- Run Ghostty config reload and shortcut refresh on the MainActor; tighten shortcut matching to avoid edge cases.
- Localize Page Up/Down labels across locales and order entries.
-
New Features
- Add Page Up/Down key support: recording, parsing/normalization, direct keyCode matching (116/121), display strings, and
web/data/cmux.schema.json. - Add regression tests for Ghostty tab routing and Page Up/Down shortcut round-trips.
- Add Page Up/Down key support: recording, parsing/normalization, direct keyCode matching (116/121), display strings, and
Summary by CodeRabbit
-
New Features
- Added Page Up / Page Down as supported keys for custom shortcuts and improved config parsing/normalization for their multiple spellings.
- Improved tab/workspace navigation to honor external keyboard bindings when appropriate.
-
Tests
- Added tests for Page Up/Page Down parsing, recording, matching, and for external keybind routing that affects workspace navigation.
-
Localization
- Added Page Up / Page Down labels (including English and Japanese).