Skip to content

Add cmd-shift-j and ctrl-shift-j keybindings to toggle terminal panel focus#51670

Closed
msmolkin wants to merge 1 commit intozed-industries:mainfrom
msmolkin:fix-terminal-toggle
Closed

Add cmd-shift-j and ctrl-shift-j keybindings to toggle terminal panel focus#51670
msmolkin wants to merge 1 commit intozed-industries:mainfrom
msmolkin:fix-terminal-toggle

Conversation

@msmolkin
Copy link
Copy Markdown
Contributor

@msmolkin msmolkin commented Mar 16, 2026

Closes #51668

This PR adds cmd-shift-j (macOS) and ctrl-shift-j (Linux/Windows) as default keybindings to toggle focus for the terminal panel.

The rationale here is that if a user presses cmd+shift+d to open the debug mode in the lower pane (which is usually reserved for the terminal and typically opened with cmd+j), they are currently forced to use the mouse to switch back to the terminal panel.

Alternatively, cmd+j could be programmed to automatically switch back to the terminal when the lower panel is already open to debug mode, which would have fixed the issue. However, adding cmd-shift-j is a more consistent addition, cleanly matching cmd-shift-d for the debugger.

Release Notes:

  • Added cmd-shift-j / ctrl-shift-j keybindings to toggle terminal panel focus

@cla-bot
Copy link
Copy Markdown

cla-bot bot commented Mar 16, 2026

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Michael.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@zed-community-bot zed-community-bot bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label Mar 16, 2026
@msmolkin msmolkin force-pushed the fix-terminal-toggle branch from e49bef0 to 3b78a16 Compare March 16, 2026 15:53
@cla-bot
Copy link
Copy Markdown

cla-bot bot commented Mar 16, 2026

We require contributors to sign our Contributor License Agreement, and we don't have @msmolkin on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@msmolkin
Copy link
Copy Markdown
Contributor Author

@cla-bot check

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 16, 2026
@cla-bot
Copy link
Copy Markdown

cla-bot bot commented Mar 16, 2026

The cla-bot has been summoned, and re-checked this pull request!

@ConradIrwin
Copy link
Copy Markdown
Member

@msmolkin We already have ctrl-` too for this, so I don't think we need another one.

How do VSCode/Jetbrains panel toggling shortcuts work? I'd rather make the existing shortcuts work well than adding new ones.

ConradIrwin pushed a commit that referenced this pull request Mar 24, 2026
…2357)

Follow-up to the discussion in #51670.

@ConradIrwin, thanks for the review!

You're right about the other editors. VS Code and JetBrains use
dedicated shortcuts for bottom panel tabs, which exactly mirrors how
`ctrl-`` already behaves in Zed, so we don't need a new keybinding.

The reason I originally proposed `cmd-shift-j` was just to match the UI
pattern of the Debugger, which clearly shows `cmd-shift-d` on hover.
Because of a minor UI discoverability bug, the Terminal button's tooltip
was completely blank, which made it look like it just lacked a shortcut
entirely.

It turns out the Terminal button's internal `toggle_action()` method was
just telling the UI to look up `ToggleFocus` instead of
`terminal_panel::Toggle` (which is what `ctrl-`` is actually bound to).

I've updated this branch with a simple one-word fix that just points the
`toggle_action` to the correct keymap. The existing `ctrl-`` shortcut
now shows up perfectly in the hover tooltip. Good catch on the existing
shortcuts, keeps this much cleaner.

Co-authored-by: Michael Smolkin <msmolkin@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add cmd-shift-j / ctrl-shift-j default keybinding to toggle terminal panel

2 participants