Fix sending alt-enter in terminal (#18363)

This commit is contained in:
Peter Tripp 2024-09-25 22:01:33 +00:00 committed by GitHub
parent 7398f795e3
commit 40408e731e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -51,6 +51,7 @@ pub fn to_esc_str(keystroke: &Keystroke, mode: &TermMode, alt_is_meta: bool) ->
("escape", AlacModifiers::None) => Some("\x1b".to_string()), ("escape", AlacModifiers::None) => Some("\x1b".to_string()),
("enter", AlacModifiers::None) => Some("\x0d".to_string()), ("enter", AlacModifiers::None) => Some("\x0d".to_string()),
("enter", AlacModifiers::Shift) => Some("\x0d".to_string()), ("enter", AlacModifiers::Shift) => Some("\x0d".to_string()),
("enter", AlacModifiers::Alt) => Some("\x1b\x0d".to_string()),
("backspace", AlacModifiers::None) => Some("\x7f".to_string()), ("backspace", AlacModifiers::None) => Some("\x7f".to_string()),
//Interesting escape codes //Interesting escape codes
("tab", AlacModifiers::Shift) => Some("\x1b[Z".to_string()), ("tab", AlacModifiers::Shift) => Some("\x1b[Z".to_string()),