[Bug]: While focus on terminal, app hotkeys is blocked #34136
Send to my agentedwardtrinhal(GitHub profile, opens in a new tab) added labelsbug
edwardtrinhal(GitHub profile, opens in a new tab) added labelsneeds-triage
juliusmarminge closed this
Sign in to join this conversation.
I looked into this on main at 25f4c9d44e (code only, I didn't reproduce it at runtime).
This is deliberate rather than a regression. Most app shortcuts, including
mod+pfor the file picker, are bound withwhen: "!terminalFocus"(packages/shared/src/keybindings.ts:85-123). The terminal also keeps every key except the terminal and diff shortcuts (apps/web/src/components/ThreadTerminalDrawer.tsx:1002-1015). On Linux and Windowsmodis Ctrl, and Ctrl+P, Ctrl+K, Ctrl+N and so on are shell keys (previous history, kill line), so the terminal has to receive them.That also means a custom rule in
keybindings.jsonwithout thewhenclause won't help, since the terminal doesn't pass the key on. On macOS, Cmd doesn't collide with shell keys, so lettingmodshortcuts through on Mac only would be possible, but that's a call for the maintainers. Related: #26407.