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 {