diff --git a/ui/src/App.tsx b/ui/src/App.tsx index 7efec56c19d7a2edb0aa4d11e33ea633141522b4..f393c6e291c009c38dc53526513cb3352d165e07 100644 --- a/ui/src/App.tsx +++ b/ui/src/App.tsx @@ -113,10 +113,14 @@ function App() { loadConversations(); }, []); - // Global keyboard shortcut for command palette (Cmd+K / Ctrl+K) + // Global keyboard shortcut for command palette (Cmd+K on macOS, Ctrl+K elsewhere) useEffect(() => { + const isMac = navigator.platform.toUpperCase().includes("MAC"); const handleKeyDown = (e: KeyboardEvent) => { - if ((e.metaKey || e.ctrlKey) && e.key === "k") { + // On macOS use Cmd+K, on other platforms use Ctrl+K + // This preserves native Ctrl+K (kill to end of line) on macOS + const modifierPressed = isMac ? e.metaKey : e.ctrlKey; + if (modifierPressed && e.key === "k") { e.preventDefault(); setCommandPaletteOpen((prev) => !prev); }