From 952ca7cfed96f2aef4b2207d61de1978bd2c725f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Mon, 4 Jul 2016 16:20:18 -0700 Subject: [PATCH] x11: handle X11's multi-key, a.k.a compose key. --- src/api/x11/events.rs | 2 +- src/events.rs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/api/x11/events.rs b/src/api/x11/events.rs index 1c6668c3..4754b1dc 100644 --- a/src/api/x11/events.rs +++ b/src/api/x11/events.rs @@ -14,7 +14,7 @@ pub fn keycode_to_element(scancode: libc::c_uint) -> Option { //ffi::XK_Sys_Req => events::VirtualKeyCode::Sys_req, ffi::XK_Escape => events::VirtualKeyCode::Escape, ffi::XK_Delete => events::VirtualKeyCode::Delete, - //ffi::XK_Multi_key => events::VirtualKeyCode::Multi_key, + ffi::XK_Multi_key => events::VirtualKeyCode::Compose, //ffi::XK_Kanji => events::VirtualKeyCode::Kanji, //ffi::XK_Muhenkan => events::VirtualKeyCode::Muhenkan, //ffi::XK_Henkan_Mode => events::VirtualKeyCode::Henkan_mode, diff --git a/src/events.rs b/src/events.rs index d13a0bfe..7186256c 100644 --- a/src/events.rs +++ b/src/events.rs @@ -220,6 +220,9 @@ pub enum VirtualKeyCode { /// The space bar. Space, + /// The "Compose" key on Linux. + Compose, + Numlock, Numpad0, Numpad1,