From aff7a83815bdc5dce4a162717391284a6e602145 Mon Sep 17 00:00:00 2001 From: Thorsten Ball Date: Wed, 19 Jun 2024 15:14:58 +0200 Subject: [PATCH] linux: Forward ctrl-w/ctrl-e to terminal (#13263) This fixes `ctrl-w` and `ctrl-e` not working in the terminal pane but instead triggering Zed actions ("close pane" and "search project files" respectively). I've added both because I think they're pretty commonly used in terminals, since they're default Emacs-style keybindings. But I also didn't want to add more, since it's relatively easy for users to define themselves which keybindings should be forwarded to the terminal and which not. All that's required is adding something like this to the keymap: ```json { "context": "Terminal", "bindings": { "ctrl-n": ["terminal::SendKeystroke", "ctrl-n"], "ctrl-p": ["terminal::SendKeystroke", "ctrl-p"] } } ``` cc @mikayla-maki Release Notes: - N/A --- assets/keymaps/default-linux.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/assets/keymaps/default-linux.json b/assets/keymaps/default-linux.json index 3befd2b671f5db04e66503c93c440c30ff8c784a..ef8c6a0b26138a3177a48f0de7cd9232aa65287a 100644 --- a/assets/keymaps/default-linux.json +++ b/assets/keymaps/default-linux.json @@ -296,6 +296,13 @@ "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",