diff --git a/apps/desktop/src/renderer/routes/_authenticated/_dashboard/workspace/$workspaceId/page.tsx b/apps/desktop/src/renderer/routes/_authenticated/_dashboard/workspace/$workspaceId/page.tsx index 959a7e599ba..f45a23b142e 100644 --- a/apps/desktop/src/renderer/routes/_authenticated/_dashboard/workspace/$workspaceId/page.tsx +++ b/apps/desktop/src/renderer/routes/_authenticated/_dashboard/workspace/$workspaceId/page.tsx @@ -174,6 +174,31 @@ function WorkspacePage() { [workspaceId, activeTabId, tabs, setActiveTab], ); + useAppHotkey( + "PREV_TAB_ALT", + () => { + if (!activeTabId || tabs.length === 0) return; + const index = tabs.findIndex((t) => t.id === activeTabId); + const prevIndex = index <= 0 ? tabs.length - 1 : index - 1; + setActiveTab(workspaceId, tabs[prevIndex].id); + }, + undefined, + [workspaceId, activeTabId, tabs, setActiveTab], + ); + + useAppHotkey( + "NEXT_TAB_ALT", + () => { + if (!activeTabId || tabs.length === 0) return; + const index = tabs.findIndex((t) => t.id === activeTabId); + const nextIndex = + index >= tabs.length - 1 || index === -1 ? 0 : index + 1; + setActiveTab(workspaceId, tabs[nextIndex].id); + }, + undefined, + [workspaceId, activeTabId, tabs, setActiveTab], + ); + const switchToTab = useCallback( (index: number) => { const tab = tabs[index]; diff --git a/apps/desktop/src/shared/hotkeys.ts b/apps/desktop/src/shared/hotkeys.ts index c4f713f5b02..38c47aaed0a 100644 --- a/apps/desktop/src/shared/hotkeys.ts +++ b/apps/desktop/src/shared/hotkeys.ts @@ -503,6 +503,16 @@ export const HOTKEYS = { label: "Next Tab", category: "Terminal", }), + PREV_TAB_ALT: defineHotkey({ + keys: "ctrl+shift+tab", + label: "Previous Tab (Alt)", + category: "Terminal", + }), + NEXT_TAB_ALT: defineHotkey({ + keys: "ctrl+tab", + label: "Next Tab (Alt)", + category: "Terminal", + }), PREV_PANE: defineHotkey({ keys: "meta+shift+left", label: "Previous Pane", diff --git a/bun.lock b/bun.lock index 6f2951b2eca..861771abacd 100644 --- a/bun.lock +++ b/bun.lock @@ -131,7 +131,7 @@ }, "apps/desktop": { "name": "@superset/desktop", - "version": "0.0.64", + "version": "0.0.65", "dependencies": { "@better-auth/stripe": "1.4.17", "@dnd-kit/core": "^6.3.1",