From 8eb374d77cc18b1aa70dc6d9fbe2410b13a2b64e Mon Sep 17 00:00:00 2001 From: SuperComboGamer Date: Sat, 13 Dec 2025 01:32:36 -0500 Subject: [PATCH] fix: use Alt-based shortcuts to avoid browser conflicts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Split right: Alt+D - Split down: Alt+Shift+D - Close terminal: Alt+W Alt modifier avoids conflicts with both terminal signals and browser shortcuts. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- apps/app/src/components/views/terminal-view.tsx | 11 ++++++++--- apps/app/src/store/app-store.ts | 8 ++++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/apps/app/src/components/views/terminal-view.tsx b/apps/app/src/components/views/terminal-view.tsx index 28325014..55000fa1 100644 --- a/apps/app/src/components/views/terminal-view.tsx +++ b/apps/app/src/components/views/terminal-view.tsx @@ -360,11 +360,16 @@ export function TerminalView() { const needsShift = parts.includes('shift'); const needsAlt = parts.includes('alt'); + // Check modifiers + const cmdMatches = needsCmd ? cmdOrCtrl : !cmdOrCtrl; + const shiftMatches = needsShift ? e.shiftKey : !e.shiftKey; + const altMatches = needsAlt ? e.altKey : !e.altKey; + return ( e.key.toLowerCase() === key && - cmdOrCtrl === needsCmd && - e.shiftKey === needsShift && - e.altKey === needsAlt + cmdMatches && + shiftMatches && + altMatches ); }; diff --git a/apps/app/src/store/app-store.ts b/apps/app/src/store/app-store.ts index cb749986..5a0f0bd8 100644 --- a/apps/app/src/store/app-store.ts +++ b/apps/app/src/store/app-store.ts @@ -195,10 +195,10 @@ export const DEFAULT_KEYBOARD_SHORTCUTS: KeyboardShortcuts = { addProfile: "N", // Only active in profiles view // Terminal shortcuts (only active in terminal view) - // Using Shift modifier to avoid conflicts with terminal signals (Ctrl+D=EOF, Ctrl+W=delete word) - splitTerminalRight: "Cmd+Shift+D", - splitTerminalDown: "Cmd+Shift+E", - closeTerminal: "Cmd+Shift+W", + // Using Alt modifier to avoid conflicts with both terminal signals AND browser shortcuts + splitTerminalRight: "Alt+D", + splitTerminalDown: "Alt+Shift+D", + closeTerminal: "Alt+W", }; export interface ImageAttachment {