From 2c7a61439b854b3e77b156a68d4c5f8385d064dd Mon Sep 17 00:00:00 2001 From: Max Booth Date: Wed, 23 Oct 2024 12:42:48 -0400 Subject: [PATCH] fix broken keycodes being offset by 8 --- src/server/client_handlers.rs | 4 +++- src/xwayland_xdg_shell/mod.rs | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/server/client_handlers.rs b/src/server/client_handlers.rs index d1559269..f09a6739 100644 --- a/src/server/client_handlers.rs +++ b/src/server/client_handlers.rs @@ -257,7 +257,9 @@ impl WprsServerState { keyboard.input::<(), _>( self, - keycode.into(), + // our keycode is getting offset by 8 for reasons + // see https://github.com/Smithay/smithay/pull/1536 + (keycode + 8).into(), state, serial, self.start_time.elapsed().as_millis() as u32, diff --git a/src/xwayland_xdg_shell/mod.rs b/src/xwayland_xdg_shell/mod.rs index 2ff9daf1..6bb323e1 100644 --- a/src/xwayland_xdg_shell/mod.rs +++ b/src/xwayland_xdg_shell/mod.rs @@ -435,7 +435,9 @@ impl WprsState { keyboard.input::<(), _>( self, - keycode.into(), + // our keycode is getting offset by 8 for reasons + // see https://github.com/Smithay/smithay/pull/1536 + (keycode + 8).into(), state, serial, self.compositor_state.start_time.elapsed().as_millis() as u32,