Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix terminal key bindings (#12558)
apricotbucket28959f0dcded71
diff --git a/assets/keymaps/default-linux.json b/assets/keymaps/default-linux.jsonindex bc5f14b00e0..8bb8753d97e 100644--- a/assets/keymaps/default-linux.json+++ b/assets/keymaps/default-linux.json@@ -642,12 +642,7 @@"pagedown": ["terminal::SendKeystroke", "pagedown"],"escape": ["terminal::SendKeystroke", "escape"],"enter": ["terminal::SendKeystroke", "enter"],- "ctrl-c": ["terminal::SendKeystroke", "ctrl-c"],-- // Some nice conveniences- "ctrl-backspace": ["terminal::SendText", "\u0015"],- "ctrl-right": ["terminal::SendText", "\u0005"],- "ctrl-left": ["terminal::SendText", "\u0001"]+ "ctrl-c": ["terminal::SendKeystroke", "ctrl-c"]}}]diff --git a/crates/terminal/src/mappings/keys.rs b/crates/terminal/src/mappings/keys.rsindex 250e0c5e5ce..e760db3616f 100644--- a/crates/terminal/src/mappings/keys.rs+++ b/crates/terminal/src/mappings/keys.rs@@ -54,6 +54,7 @@ pub fn to_esc_str(keystroke: &Keystroke, mode: &TermMode, alt_is_meta: bool) ->("backspace", AlacModifiers::None) => Some("\x7f".to_string()),//Interesting escape codes("tab", AlacModifiers::Shift) => Some("\x1b[Z".to_string()),+ ("backspace", AlacModifiers::Ctrl) => Some("\x08".to_string()),("backspace", AlacModifiers::Alt) => Some("\x1b\x7f".to_string()),("backspace", AlacModifiers::Shift) => Some("\x7f".to_string()),("space", AlacModifiers::Ctrl) => Some("\x00".to_string()),