From 26f13fd9e1de13116c723c6cc3fba7f631d8f2db Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Wed, 21 May 2025 11:58:33 +0200 Subject: [PATCH] Upgrade xkbcommon. --- Cargo.toml | 2 +- src/linux/wayland/keyboard.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7d48342..7d82ec4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,7 +40,7 @@ epoll = {version = "4.1.0", optional=true} inotify = {version = "0.11", default-features=false, optional=true} input = {version = "0.9", optional=true} input-linux = { version = "0.7.1", optional = true } -xkbcommon = { version = "0.5.0", optional = true } +xkbcommon = { version = "0.8", optional = true } [target.'cfg(target_os = "windows")'.dependencies] winapi = { version = "0.3", features = ["winuser", "errhandlingapi", "processthreadsapi"] } diff --git a/src/linux/wayland/keyboard.rs b/src/linux/wayland/keyboard.rs index 8a2b8db..8cefdc0 100644 --- a/src/linux/wayland/keyboard.rs +++ b/src/linux/wayland/keyboard.rs @@ -92,8 +92,9 @@ impl Keyboard { } fn get_key_utf8(&self, keycode: u32) -> Option { + let keycode = xkb::Keycode::from(keycode); let keysym = self.state.key_get_one_sym(keycode); - if keysym == xkb::KEY_NoSymbol { + if keysym == xkb::keysyms::KEY_NoSymbol.into() { return None; } let utf8 = self.state.key_get_utf8(keycode);