From 3b5aa8dace925a830a016f8650238b586a329b1b 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 69e4b619d68dc2724cb3635b917c5fcb6f85b054..57c7a6d3a39f0be774334531809308a7e85f45e0 100644 --- a/assets/keymaps/default-linux.json +++ b/assets/keymaps/default-linux.json @@ -249,13 +249,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", @@ -465,12 +458,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": { @@ -604,12 +601,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"],