keyboard: Introduce a KeyCode type wrapping u32
This commit is contained in:
@ -17,12 +17,14 @@ pub enum PressType {
|
||||
Pressed = 1,
|
||||
}
|
||||
|
||||
pub type KeyCode = u32;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct KeyState {
|
||||
pub pressed: PressType,
|
||||
pub locked: bool,
|
||||
/// A cache of raw keycodes derived from Action::Sumbit given a keymap
|
||||
pub keycodes: Vec<u32>,
|
||||
pub keycodes: Vec<KeyCode>,
|
||||
/// Static description of what the key does when pressed or released
|
||||
pub action: Action,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user