From 0a096bf531dccb2658e6aa8f6f90dd961c1eeffc Mon Sep 17 00:00:00 2001 From: CharlesChen0823 Date: Tue, 14 May 2024 17:09:21 +0800 Subject: [PATCH] terminal: Fix Alacritty key bindings (#11782) Close #10502 Release Notes: - Fixed `ctrl-space` not being forwarded correctly in the terminal view. ([#10502](https://github.com/zed-industries/zed/issues/10502)) --- crates/terminal/src/mappings/keys.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/terminal/src/mappings/keys.rs b/crates/terminal/src/mappings/keys.rs index ca5defd23f..250e0c5e5c 100644 --- a/crates/terminal/src/mappings/keys.rs +++ b/crates/terminal/src/mappings/keys.rs @@ -56,6 +56,7 @@ pub fn to_esc_str(keystroke: &Keystroke, mode: &TermMode, alt_is_meta: bool) -> ("tab", AlacModifiers::Shift) => Some("\x1b[Z".to_string()), ("backspace", AlacModifiers::Alt) => Some("\x1b\x7f".to_string()), ("backspace", AlacModifiers::Shift) => Some("\x7f".to_string()), + ("space", AlacModifiers::Ctrl) => Some("\x00".to_string()), ("home", AlacModifiers::Shift) if mode.contains(TermMode::ALT_SCREEN) => { Some("\x1b[1;2H".to_string()) }