aboutsummaryrefslogtreecommitdiff
path: root/src/input/model.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/input/model.rs')
-rw-r--r--src/input/model.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/input/model.rs b/src/input/model.rs
index 777c6a3b..a439217f 100644
--- a/src/input/model.rs
+++ b/src/input/model.rs
@@ -1,4 +1,6 @@
-use crossterm::event::{KeyCode, KeyEvent, KeyModifiers, KeyboardEnhancementFlags};
+#[cfg(not(windows))]
+use crossterm::event::KeyboardEnhancementFlags;
+use crossterm::event::{KeyCode, KeyEvent, KeyModifiers};
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
@@ -41,6 +43,7 @@ impl From<KeyEvent> for TerminalKey {
}
}
+#[cfg(not(windows))]
pub fn ime_compatible_keyboard_enhancement_flags() -> KeyboardEnhancementFlags {
KeyboardEnhancementFlags::DISAMBIGUATE_ESCAPE_CODES
| KeyboardEnhancementFlags::REPORT_EVENT_TYPES
@@ -138,6 +141,7 @@ mod tests {
);
}
+ #[cfg(not(windows))]
#[test]
fn keyboard_enhancement_flags_stay_ime_compatible() {
let flags = ime_compatible_keyboard_enhancement_flags();