Struct kernel::common::event::KeyEvent
[−]
[src]
pub struct KeyEvent { pub character: char, pub scancode: u8, pub pressed: bool, }
A key event (such as a pressed key)
Fields
character | The char of the key |
scancode | The scancode of the key |
pressed | Is the key pressed? |
Methods
impl KeyEvent
fn to_event(&self) -> Event
Convert to an Event
fn from_event(event: Event) -> KeyEvent
Convert from an Event
fn trigger(&self)
Key event trigger