diff options
| author | JJ Liebig <jonathan.liebig@gmail.com> | 2026-09-01 23:46:16 +0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-01 21:46:16 +0200 |
| commit | 99c23cd1ea7468bd3661f6483c7105396503b417 (patch) | |
| tree | eb1582557a5a62f4679c706b8f53e29529d1568a /src/platform | |
| parent | 98307c509e9688575d006b47d26d0db561cda0a4 (diff) | |
fix(windows): preserve native pane key identity (#3503)
Diffstat (limited to 'src/platform')
| -rw-r--r-- | src/platform/windows.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/platform/windows.rs b/src/platform/windows.rs index 03b11125..2fdba9c8 100644 --- a/src/platform/windows.rs +++ b/src/platform/windows.rs @@ -2586,27 +2586,27 @@ mod tests { #[test] fn windows_conpty_native_encoder_uses_canonical_phase_and_repeat_count() { let key = crate::input::TerminalKey::new( - crossterm::event::KeyCode::Esc, - crossterm::event::KeyModifiers::empty(), + crossterm::event::KeyCode::Char('7'), + crossterm::event::KeyModifiers::CONTROL, ) .with_windows_record(crate::input::WindowsKeyRecord { key_down: true, repeat_count: 3, - virtual_key_code: 27, - virtual_scan_code: 1, - unicode: 27, - control_key_state: 0, + virtual_key_code: 0x37, + virtual_scan_code: 0x08, + unicode: 0, + control_key_state: 0x0008, }); assert_eq!( super::encode_windows_conpty_fallback(&key), - Some(b"\x1b[27;1;27;1;0;3_".to_vec()) + Some(b"\x1b[55;8;0;1;8;3_".to_vec()) ); let mut release = key.with_kind(crossterm::event::KeyEventKind::Release); release.repeat_count = 3; assert_eq!( super::encode_windows_conpty_fallback(&release), - Some(b"\x1b[27;1;27;0;0;1_".to_vec()) + Some(b"\x1b[55;8;0;0;8;1_".to_vec()) ); } |
