From 161c6ca6a44eba0a350b21b2b3cc6286cf6df1bd Mon Sep 17 00:00:00 2001 From: Peter Tripp Date: Tue, 30 Jul 2024 17:18:06 -0400 Subject: [PATCH] terminal: Fix ctrl-a keybind on Linux (#15512) - Disable Terminal ctrl-a (conflicts with readline). - Standardize modifier order to use ctrl-shift instead of shift-ctrl to match existing keys. - Move ctrl-shift-c (collab) to \!Terminal context (fix flickering in terminal right click menu). - Consolidate two Terminal blocks in linux keybind --- assets/keymaps/default-linux.json | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/assets/keymaps/default-linux.json b/assets/keymaps/default-linux.json index 1687404781..f8178efe11 100644 --- a/assets/keymaps/default-linux.json +++ b/assets/keymaps/default-linux.json @@ -246,13 +246,6 @@ "ctrl-alt-shift-x": "search::ToggleRegex" } }, - { - "context": "Terminal", - "bindings": { - "ctrl-w": ["terminal::SendKeystroke", "ctrl-w"], - "ctrl-e": ["terminal::SendKeystroke", "ctrl-e"] - } - }, // Bindings from VS Code { "context": "Editor", @@ -462,12 +455,16 @@ { "bindings": { "ctrl-alt-shift-f": "workspace::FollowNextCollaborator", - // TODO: Move this to a dock open action - "ctrl-shift-c": "collab_panel::ToggleFocus", "ctrl-alt-i": "zed::DebugElements", "ctrl-:": "editor::ToggleInlayHints" } }, + { + "context": "!Terminal", + "bindings": { + "ctrl-shift-c": "collab_panel::ToggleFocus" + } + }, { "context": "Editor && mode == full", "bindings": { @@ -601,12 +598,14 @@ "context": "Terminal", "bindings": { "ctrl-alt-space": "terminal::ShowCharacterPalette", - "shift-ctrl-c": "terminal::Copy", + "ctrl-shift-c": "terminal::Copy", "ctrl-insert": "terminal::Copy", - "ctrl-a": "editor::SelectAll", - "shift-ctrl-v": "terminal::Paste", + // "ctrl-a": "editor::SelectAll", // conflicts with readline + "ctrl-shift-v": "terminal::Paste", "shift-insert": "terminal::Paste", "ctrl-enter": "assistant::InlineAssist", + "ctrl-w": ["terminal::SendKeystroke", "ctrl-w"], + "ctrl-e": ["terminal::SendKeystroke", "ctrl-e"], "up": ["terminal::SendKeystroke", "up"], "pageup": ["terminal::SendKeystroke", "pageup"], "down": ["terminal::SendKeystroke", "down"],