aboutsummaryrefslogtreecommitdiff
path: root/src/pane
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-08-09 05:10:35 +0300
committerGitHub <noreply@github.com>2026-08-09 05:10:35 +0300
commitd277d2f83b749a38c90eb96ef7cd329cc2171cd7 (patch)
treeec4b516401fc97d8356b85557e407c1d216aa24b /src/pane
parent2baebb50b0a2c639fb7fc1a4488994c78d4a0b89 (diff)
fix(input): preserve alt-prefixed control keys (#2543)
refs #2514
Diffstat (limited to 'src/pane')
-rw-r--r--src/pane/terminal.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/pane/terminal.rs b/src/pane/terminal.rs
index 91fcb4fe..a6e5c1da 100644
--- a/src/pane/terminal.rs
+++ b/src/pane/terminal.rs
@@ -4593,6 +4593,23 @@ mod tests {
}
#[test]
+ fn ghostty_kitty_pane_preserves_legacy_ctrl_alt_letter() {
+ let (tx, _rx) = mpsc::channel(4);
+ let terminal = crate::ghostty::Terminal::new(80, 24, 0).unwrap();
+ let pane = GhosttyPaneTerminal::new(terminal, tx.clone()).unwrap();
+ let pane_id = PaneId::from_raw(1);
+ pane.process_pty_bytes(pane_id, 0, b"\x1b[>5u", &tx);
+
+ let mut events = crate::raw_input::parse_raw_input_bytes_sync(b"\x1b\x06");
+ let crate::raw_input::RawInputEvent::Key(key) = events.remove(0) else {
+ panic!("expected key event");
+ };
+ let encoded = pane.encode_terminal_key(key, pane.keyboard_protocol().unwrap());
+
+ assert_eq!(encoded, b"\x1b[102;7u");
+ }
+
+ #[test]
fn ghostty_pane_characterizes_ctrl_backspace_encoding() {
let (tx, _rx) = mpsc::channel(4);
let legacy = GhosttyPaneTerminal::new(