summaryrefslogtreecommitdiff
path: root/src/raw_input.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-06-15 04:53:46 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-06-15 04:53:46 +0300
commitefe7c557690157a4e133cd60dd7e2ec1bf6124f7 (patch)
treed0102e8bc49c291f84118c9612a662a58cf9946d /src/raw_input.rs
parent3e8f906c6fcc4e9e7be6b3d0c4ee84b804027b5a (diff)
fix: accept alternate f1-f4 key sequences
refs #574
Diffstat (limited to 'src/raw_input.rs')
-rw-r--r--src/raw_input.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/raw_input.rs b/src/raw_input.rs
index 8925e4a4..fddcb3fd 100644
--- a/src/raw_input.rs
+++ b/src/raw_input.rs
@@ -954,6 +954,7 @@ mod tests {
(b"\x1b[57420;1u", KeyCode::Down, KeyModifiers::empty()),
(b"\x1b[57423;1u", KeyCode::Home, KeyModifiers::empty()),
(b"\x1bOq", KeyCode::Char('1'), KeyModifiers::empty()),
+ (b"\x1b[14~", KeyCode::F(4), KeyModifiers::empty()),
(b"\x1b[49:33;2:1u", KeyCode::Char('1'), KeyModifiers::SHIFT),
];
@@ -988,6 +989,14 @@ mod tests {
}
#[test]
+ fn modified_rxvt_f_key_alias_stays_unsupported() {
+ let (event, consumed) = extract_one_event(b"\x1b[14;3~").unwrap();
+
+ assert_eq!(consumed, 7);
+ assert!(matches!(event, RawInputEvent::Unsupported));
+ }
+
+ #[test]
fn flushes_lone_escape_after_timeout() {
let (tx, mut rx) = mpsc::channel(4);
let mut buffer = vec![ESC];