From 52a78d61bfdd4f4dd70971c0b72da2bfc9f86753 Mon Sep 17 00:00:00 2001 From: Matteo Signer Date: Thu, 21 Sep 2017 16:09:07 +0200 Subject: [PATCH] Fix #273 (#274) --- src/platform/linux/x11/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/platform/linux/x11/mod.rs b/src/platform/linux/x11/mod.rs index f87e5204..28495d37 100644 --- a/src/platform/linux/x11/mod.rs +++ b/src/platform/linux/x11/mod.rs @@ -278,7 +278,9 @@ impl EventsLoop { }; let keysym = unsafe { - (self.display.xlib.XKeycodeToKeysym)(self.display.display, xkev.keycode as ffi::KeyCode, 0) + let mut keysym = 0; + (self.display.xlib.XLookupString)(xkev, ptr::null_mut(), 0, &mut keysym, ptr::null_mut()); + keysym }; let vkey = events::keysym_to_element(keysym as libc::c_uint);