1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#[cfg(windows)] pub mod windows; #[cfg(windows)] pub use windows::*; #[cfg(not(any(windows)))] pub mod other; #[cfg(not(any(windows)))] pub use other::*; #[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)] pub enum KeyEvent { KeyUp(KeyCode), KeyDown(KeyCode), }