summaryrefslogtreecommitdiff
path: root/src/input
diff options
context:
space:
mode:
authorJJ Liebig <jonathan.liebig@gmail.com>2026-09-01 23:46:16 +0400
committerGitHub <noreply@github.com>2026-09-01 21:46:16 +0200
commit99c23cd1ea7468bd3661f6483c7105396503b417 (patch)
treeeb1582557a5a62f4679c706b8f53e29529d1568a /src/input
parent98307c509e9688575d006b47d26d0db561cda0a4 (diff)
fix(windows): preserve native pane key identity (#3503)
Diffstat (limited to 'src/input')
-rw-r--r--src/input/mod.rs1
-rw-r--r--src/input/model.rs5
2 files changed, 3 insertions, 3 deletions
diff --git a/src/input/mod.rs b/src/input/mod.rs
index 0cd6c4bd..13b8ffa3 100644
--- a/src/input/mod.rs
+++ b/src/input/mod.rs
@@ -23,7 +23,6 @@ pub(crate) use lease::{InputLeaseKey, InputLeaseTable, RepeatPlan};
pub use model::ime_compatible_keyboard_enhancement_flags;
#[cfg(any(unix, test))]
pub use model::MouseProtocolMode;
-#[cfg(any(windows, test))]
pub use model::WindowsKeyRecord;
pub use model::{
host_modify_other_keys_mode, KeyIdentity, KeyboardProtocol, MouseProtocolEncoding, TerminalKey,
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 {