From 950310c8a589b244f962050afda98778e78afbc6 Mon Sep 17 00:00:00 2001 From: Dorota Czaplejewicz Date: Tue, 17 Dec 2019 12:27:26 +0000 Subject: [PATCH] keyboard: Introduce a KeyCode type wrapping u32 --- src/keyboard.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/keyboard.rs b/src/keyboard.rs index b64038bb..386f6a7b 100644 --- a/src/keyboard.rs +++ b/src/keyboard.rs @@ -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, + pub keycodes: Vec, /// Static description of what the key does when pressed or released pub action: Action, }