summaryrefslogtreecommitdiff
path: root/src/input/model.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-06-07 00:07:24 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-06-07 16:29:44 +0300
commit3c2b46d24aa6c8011a1e198143752f2aa414d585 (patch)
treea52280bccc824ca656f8bc986a756f30901974e4 /src/input/model.rs
parent5d7e56737ef30d9de5802b0684a9428c40131dda (diff)
feat: add native windows beta support
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();