fix: preserve alt backspace in panes (#165)

refs #155

Co-authored-by: kangal-bot <kangal-bot@users.noreply.github.com>
This commit is contained in:
kangal-bot
2026-05-18 20:13:19 +03:00
committed by GitHub
co-authored by kangal-bot
parent f33e1a0faa
commit fa0e380e62
7 changed files with 100 additions and 0 deletions
+15
View File
@@ -523,6 +523,12 @@ mod tests {
assert_eq!(encode_key(key, KeyboardProtocol::Legacy), b"\x1ba");
}
#[test]
fn legacy_alt_backspace_sends_escape_delete() {
let key = KeyEvent::new(KeyCode::Backspace, KeyModifiers::ALT);
assert_eq!(encode_key(key, KeyboardProtocol::Legacy), b"\x1b\x7f");
}
#[test]
fn application_cursor_keys_use_ss3_sequences() {
assert_eq!(encode_cursor_key(KeyCode::Up, true), b"\x1bOA");
@@ -638,6 +644,15 @@ mod tests {
);
}
#[test]
fn kitty_alt_backspace_uses_csi_u() {
let key = KeyEvent::new(KeyCode::Backspace, KeyModifiers::ALT);
assert_eq!(
encode_key(key, KeyboardProtocol::Kitty { flags: 1 }),
b"\x1b[127;3u"
);
}
#[test]
fn kitty_plain_ctrl_c_uses_csi_u() {
let key = KeyEvent::new(KeyCode::Char('c'), KeyModifiers::CONTROL);