diff --git a/src/lib.rs b/src/lib.rs index a6548e1..0f5b33c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -135,8 +135,12 @@ pub enum Key { Space, Tab, CapsLock, + LeftShift, + RightShift, + LeftCtrl, + RightCtrl, - Count = 80, + Count = 84, } #[cfg(target_os = "windows")] diff --git a/src/windows.rs b/src/windows.rs index 52fa9ef..5340c33 100644 --- a/src/windows.rs +++ b/src/windows.rs @@ -106,6 +106,10 @@ fn update_key_state(window: &mut Window, wparam: u32, state: bool) { 0x039 => window.keys[Key::Space as usize] = state, 0x00F => window.keys[Key::Tab as usize] = state, 0x03A => window.keys[Key::CapsLock as usize] = state, + 0x02A => window.keys[Key::LeftShift as usize] = state, + 0x036 => window.keys[Key::RightShift as usize] = state, + 0x01D => window.keys[Key::LeftCtrl as usize] = state, + 0x11D => window.keys[Key::RightCtrl as usize] = state, _ => (), } }