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/input/model.rs | |
| parent | 98307c509e9688575d006b47d26d0db561cda0a4 (diff) | |
fix(windows): preserve native pane key identity (#3503)
Diffstat (limited to 'src/input/model.rs')
| -rw-r--r-- | src/input/model.rs | 5 |
1 files changed, 3 insertions, 2 deletions
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<WindowsKeyRecord> { + #[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 { |
