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