diff options
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 { |
