1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
//! Window-based inputs captured during event loop processing. mod key_buf; mod mouse_buf; mod typing; pub use self::{key_buf::KeyBuf, mouse_buf::MouseBuf, typing::Typing}; /// A container of Window input buffers. #[derive(Default)] pub struct Input { /// Gets current keyboard inputs. pub keys: KeyBuf, /// Gets current mouse/tablet/touch inputs. pub mouse: MouseBuf, } // TODO: Should we add 'normal' keys as something like `Other(char)`? /// Keys that can be detected as pressed or released. #[derive(Debug, PartialEq)] pub enum Key { /// Back Back, /// Left Arrow Left, /// Delete Delete, /// Right Arrow Right, /// Up Arrow Up, /// Down Arrow Down, /// Home Home, /// End End, }