Watch rotation + galister fixes (Keyboard mapping fix, OpenXR hand transform fix) (#4)

* Watch rotation + galister fixes (Keyboard mapping fix, OpenXR hand transform fix)

* Use from_scale_rotation_translation
This commit is contained in:
Aleksander
2024-01-30 21:22:18 +01:00
committed by GitHub
parent dded4f6398
commit 6999a4b277
5 changed files with 17 additions and 7 deletions

View File

@@ -108,7 +108,7 @@ impl UInputProvider {
}
for key in VirtualKey::iter() {
let key: Key = unsafe { transmute(key as u16) };
let key: Key = unsafe { transmute((key as u16) - 8) };
if handle.set_keybit(key).is_err() {
return None;
}
@@ -249,6 +249,7 @@ pub const SUPER: KeyModifier = 0x40;
pub const META: KeyModifier = 0x80;
#[allow(non_camel_case_types)]
#[repr(u16)]
#[derive(Debug, PartialEq, Clone, Copy, IntegerId, EnumString, EnumIter)]
pub enum VirtualKey {
Escape = 9,