Skip to content
Source
Sign inSign up

[Bug]: While focus on terminal, app hotkeys is blocked #34136

Send to my agent
Closededwardtrinhal(GitHub profile, opens in a new tab) opened this issue 2 comments

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/desktop

Steps to reproduce

  1. Open Terminal and focus on it
  2. CMD + P to open file search

Expected behavior

When focus on terminal, CMD + P should show the file search (same for all other app hotkeys)

Actual behavior

When focus on terminal, CMD + P does not show the file search (same for all other app hotkeys)

Impact

Minor bug or occasional failure

Version or commit

Version 0.1.7 (322f6544dfad)

Environment

No response

Logs or stack traces

Screenshots, recordings, or supporting files

No response

Workaround

No response

  1. edwardtrinhal(GitHub profile, opens in a new tab) added labelsneeds-triage

  2. 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+p for the file picker, are bound with when: "!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 Windows mod is 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.json without the when clause won't help, since the terminal doesn't pass the key on. On macOS, Cmd doesn't collide with shell keys, so letting mod shortcuts through on Mac only would be possible, but that's a call for the maintainers. Related: #26407.

  3. juliusmarmingecommented

    This is how it is meant to work: .

    Closing as not planned.

  4. juliusmarminge closed this

Sign in to join this conversation.