From d75d2d857de2f08979d9bf07607a6b175a168afb Mon Sep 17 00:00:00 2001 From: nikuscs Date: Sun, 10 May 2026 12:34:14 +0100 Subject: [PATCH] Fix macOS tab jump shortcut conflict (#859) --- CHANGELOG.md | 1 + .../src/keyboard/keyboard-shortcuts.test.ts | 21 +++++++++++++++---- .../app/src/keyboard/keyboard-shortcuts.ts | 15 ++++++++++++- 3 files changed, 32 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c7d465ce..bc32e73d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ - iOS project picker now submits the typed path. ([#831](https://github.com/getpaseo/paseo/pull/831)) - System messages and chat mentions routed to multiple agents now reach every recipient consistently. ([#830](https://github.com/getpaseo/paseo/pull/830)) - Clicking a Markdown link in agent output no longer reloads the desktop app on top of opening the link. +- macOS desktop tab-jump shortcuts now use Cmd+Option+1-9, avoiding conflicts with Option-based international keyboard characters such as `@`. ### Security diff --git a/packages/app/src/keyboard/keyboard-shortcuts.test.ts b/packages/app/src/keyboard/keyboard-shortcuts.test.ts index b1b5d2b5f..9fa7a3444 100644 --- a/packages/app/src/keyboard/keyboard-shortcuts.test.ts +++ b/packages/app/src/keyboard/keyboard-shortcuts.test.ts @@ -148,9 +148,16 @@ describe("keyboard-shortcuts", () => { payload: { index: 2 }, }, { - name: "matches tab index jump on desktop via Alt+digit", + name: "matches tab index jump on mac desktop via Cmd+Alt+digit", + event: { key: "@", code: "Digit2", metaKey: true, altKey: true }, + context: { isMac: true, isDesktop: true }, + action: "workspace.tab.navigate.index", + payload: { index: 2 }, + }, + { + name: "matches tab index jump on non-mac desktop via Alt+digit", event: { key: "2", code: "Digit2", altKey: true }, - context: { isDesktop: true }, + context: { isMac: false, isDesktop: true }, action: "workspace.tab.navigate.index", payload: { index: 2 }, }, @@ -333,6 +340,11 @@ describe("keyboard-shortcuts", () => { event: { key: "t", code: "KeyT", ctrlKey: true }, context: { isMac: true }, }, + { + name: "keeps mac Option+digit available for international text input", + event: { key: "@", code: "Digit2", altKey: true }, + context: { isMac: true, isDesktop: true, focusScope: "message-input" }, + }, { name: "does not match Ctrl+K for command center on non-mac in terminal", event: { key: "k", code: "KeyK", ctrlKey: true }, @@ -477,16 +489,17 @@ describe("keyboard-shortcut help sections", () => { "new-agent": ["mod", "shift", "O"], "workspace-tab-new": ["mod", "T"], "workspace-jump-index": ["mod", "1-9"], - "workspace-tab-jump-index": ["alt", "1-9"], + "workspace-tab-jump-index": ["mod", "alt", "1-9"], "workspace-tab-close-current": ["meta", "W"], "workspace-pane-split-right": ["mod", "\\"], "workspace-pane-close": ["mod", "shift", "W"], }, }, { - name: "shows Ctrl+W close tab for non-mac desktop", + name: "uses non-mac desktop defaults for tab jump and close tab", context: { isMac: false, isDesktop: true }, expectedKeys: { + "workspace-tab-jump-index": ["alt", "1-9"], "workspace-tab-close-current": ["ctrl", "W"], }, }, diff --git a/packages/app/src/keyboard/keyboard-shortcuts.ts b/packages/app/src/keyboard/keyboard-shortcuts.ts index f64db03af..96e33b9bc 100644 --- a/packages/app/src/keyboard/keyboard-shortcuts.ts +++ b/packages/app/src/keyboard/keyboard-shortcuts.ts @@ -292,11 +292,24 @@ const SHORTCUT_BINDINGS: readonly ShortcutBinding[] = [ }, // --- Tab index jump --- + { + id: "workspace-tab-navigate-index-cmd-alt-digit-mac-desktop", + action: "workspace.tab.navigate.index", + combo: "Cmd+Alt+Digit", + when: { mac: true, desktop: true, commandCenter: false }, + payload: { type: "index" }, + help: { + id: "workspace-tab-jump-index", + section: "navigation", + label: "Jump to tab", + keys: ["mod", "alt", "1-9"], + }, + }, { id: "workspace-tab-navigate-index-alt-digit-desktop", action: "workspace.tab.navigate.index", combo: "Alt+Digit", - when: { desktop: true, commandCenter: false }, + when: { mac: false, desktop: true, commandCenter: false }, payload: { type: "index" }, help: { id: "workspace-tab-jump-index",