From 64d4e01061f42e6d0a3e9f0c4f638e3d69b5abc3 Mon Sep 17 00:00:00 2001 From: Michael Smolkin <45619570+msmolkin@users.noreply.github.com> Date: Tue, 24 Mar 2026 18:24:34 -0400 Subject: [PATCH] terminal_view: Ensure terminal toggle shortcut appears in tooltip (#52357) 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 --- crates/terminal_view/src/terminal_panel.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/terminal_view/src/terminal_panel.rs b/crates/terminal_view/src/terminal_panel.rs index 90e38bfdd9e9a123ccf02379f048e694cfd18353..2ecc959663a082aac2d37410639f55e4ff242681 100644 --- a/crates/terminal_view/src/terminal_panel.rs +++ b/crates/terminal_view/src/terminal_panel.rs @@ -1646,7 +1646,7 @@ impl Panel for TerminalPanel { } fn toggle_action(&self) -> Box { - Box::new(ToggleFocus) + Box::new(Toggle) } fn pane(&self) -> Option> {