From 99c23cd1ea7468bd3661f6483c7105396503b417 Mon Sep 17 00:00:00 2001 From: JJ Liebig Date: Tue, 1 Sep 2026 23:46:16 +0400 Subject: fix(windows): preserve native pane key identity (#3503) --- src/input/model.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/input/model.rs') diff --git a/src/input/model.rs b/src/input/model.rs index e45ef378..304c4f20 100644 --- a/src/input/model.rs +++ b/src/input/model.rs @@ -3,7 +3,6 @@ use crossterm::event::KeyboardEnhancementFlags; use crossterm::event::{KeyCode, KeyEvent, KeyModifiers}; use serde::{Deserialize, Serialize}; -#[cfg(any(windows, test))] #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] pub struct WindowsKeyRecord { pub key_down: bool, @@ -167,12 +166,14 @@ impl TerminalKey { } } - #[cfg(any(windows, test))] pub(crate) fn windows_record(&self) -> Option { + #[cfg(any(windows, test))] match self.source { KeySource::WindowsConsole { record, .. } => Some(record), KeySource::Synthesized | KeySource::Vt { .. } => None, } + #[cfg(not(any(windows, test)))] + None } pub(crate) fn identity(&self) -> KeyIdentity { -- cgit v1.2.3