diff --git a/README.md b/README.md index 6bcfbaab..63f1a542 100644 --- a/README.md +++ b/README.md @@ -482,6 +482,7 @@ Single-digit selection (1-9), color-coded status, token counts, auto-refresh. De | Shortcut | Action | |----------|--------| | `Ctrl/Cmd+W` | Kill active session | +| `Ctrl/Cmd+K` | Find open session or start a new one | | `Ctrl/Cmd+Tab` | Next session | | `Alt/Option+[` / `Alt/Option+]` | Previous / next session | | `Alt/Option+1`-`Alt/Option+9` | Switch to tab N (physical keys, so macOS Option layouts work) | diff --git a/src/web/public/app.js b/src/web/public/app.js index c63f12be..1a08d601 100644 --- a/src/web/public/app.js +++ b/src/web/public/app.js @@ -804,11 +804,19 @@ class CodemanApp { // Don't intercept keys during CJK IME composition if (e.isComposing || e.keyCode === 229) return; + if (this.shouldOpenCommandPaletteFromShortcut?.(e)) { + e.preventDefault(); + this.openCommandPalette(); + return; + } + // Escape - close panels and modals (different logic: no preventDefault, no return) if (e.key === 'Escape') { this.closeAllPanels(); this.closeHelp(); if (this.attachmentHistoryDrawerOpen) this.closeAttachmentHistory(); + this.closeSessionManager(); + this.closeCommandPalette?.(); } // Option/Alt session navigation uses physical key CODES, not e.key, so macOS diff --git a/src/web/public/index.html b/src/web/public/index.html index b00481eb..de3daa80 100644 --- a/src/web/public/index.html +++ b/src/web/public/index.html @@ -569,18 +569,47 @@ @@ -1963,6 +1992,36 @@ + + + + + + +