aboutsummaryrefslogtreecommitdiff
path: root/src/input/encode.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/input/encode.rs')
-rw-r--r--src/input/encode.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/input/encode.rs b/src/input/encode.rs
index 81454ddc..ea7949aa 100644
--- a/src/input/encode.rs
+++ b/src/input/encode.rs
@@ -524,6 +524,12 @@ mod tests {
}
#[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");
assert_eq!(encode_cursor_key(KeyCode::Down, true), b"\x1bOB");
@@ -639,6 +645,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);
assert_eq!(