diff --git a/Cargo.toml b/Cargo.toml
index d2f3c9026bc..cc1654f6bca 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -93,11 +93,11 @@ wayland-client = { version = "0.28", features = [ "dlopen"] , optional = true }
sctk = { package = "smithay-client-toolkit", version = "0.12.3", optional = true }
mio = { version = "0.7", features = ["os-ext"], optional = true }
mio-misc = { version = "1.0", optional = true }
-x11-dl = { version = "2.18.5", optional = true }
+x11-dl = { version = "2.19.1", optional = true }
percent-encoding = { version = "2.0", optional = true }
parking_lot = { version = "0.11.0", optional = true }
memmap2 = { version = "0.2.1", optional = true }
-xkbcommon-dl = { git = "https://github.com/maroider/xkbcommon-dl", rev = "900832888ad6f11011d1369befb344a9aa8a9610" }
+xkbcommon-dl = { git = "https://github.com/mahkoh/xkbcommon-dl", rev = "3f92ba445a590a2928942fd1ce24fa6965f76bca" }
[target.'cfg(target_arch = "wasm32")'.dependencies.web_sys]
package = "web-sys"
diff --git a/src/platform_impl/linux/common/keymap.rs b/src/platform_impl/linux/common/keymap.rs
index 8e2e6c2458f..51083d6d386 100644
--- a/src/platform_impl/linux/common/keymap.rs
+++ b/src/platform_impl/linux/common/keymap.rs
@@ -826,6 +826,57 @@ pub fn keysym_to_key(keysym: u32) -> Key<'static> {
keysyms::XKB_KEY_SunVideoRaiseBrightness => Key::BrightnessUp,
// XKB_KEY_SunPowerSwitchShift
//
+ // Dead keys
+ keysyms::XKB_KEY_dead_greek => Key::Dead(None),
+ keysyms::XKB_KEY_dead_currency => Key::Dead(None),
+ keysyms::XKB_KEY_dead_stroke => Key::Dead(None),
+ keysyms::XKB_KEY_dead_voiced_sound => Key::Dead(None),
+ keysyms::XKB_KEY_dead_semivoiced_sound => Key::Dead(None),
+ keysyms::XKB_KEY_dead_lowline => Key::Dead(None),
+ keysyms::XKB_KEY_dead_aboveverticalline => Key::Dead(None),
+ keysyms::XKB_KEY_dead_belowverticalline => Key::Dead(None),
+ keysyms::XKB_KEY_dead_longsolidusoverlay => Key::Dead(None),
+ keysyms::XKB_KEY_dead_grave => Key::Dead(Some('`')),
+ keysyms::XKB_KEY_dead_acute => Key::Dead(Some('´')),
+ keysyms::XKB_KEY_dead_circumflex => Key::Dead(Some('^')),
+ keysyms::XKB_KEY_dead_tilde => Key::Dead(Some('~')),
+ keysyms::XKB_KEY_dead_macron => Key::Dead(Some('¯')),
+ keysyms::XKB_KEY_dead_breve => Key::Dead(Some('˘')),
+ keysyms::XKB_KEY_dead_abovedot => Key::Dead(Some('˙')),
+ keysyms::XKB_KEY_dead_diaeresis => Key::Dead(Some('¨')),
+ keysyms::XKB_KEY_dead_abovering => Key::Dead(Some('°')),
+ keysyms::XKB_KEY_dead_doubleacute => Key::Dead(Some('˝')),
+ keysyms::XKB_KEY_dead_caron => Key::Dead(Some('ˇ')),
+ keysyms::XKB_KEY_dead_cedilla => Key::Dead(Some('¸')),
+ keysyms::XKB_KEY_dead_ogonek => Key::Dead(Some('˛')),
+ keysyms::XKB_KEY_dead_iota => Key::Dead(Some('ͺ')),
+ keysyms::XKB_KEY_dead_belowdot => Key::Dead(None),
+ keysyms::XKB_KEY_dead_hook => Key::Dead(None),
+ keysyms::XKB_KEY_dead_horn => Key::Dead(None),
+ keysyms::XKB_KEY_dead_abovecomma => Key::Dead(None),
+ keysyms::XKB_KEY_dead_abovereversedcomma => Key::Dead(None),
+ keysyms::XKB_KEY_dead_doublegrave => Key::Dead(None),
+ keysyms::XKB_KEY_dead_belowring => Key::Dead(Some('˳')),
+ keysyms::XKB_KEY_dead_belowmacron => Key::Dead(Some('ˍ')),
+ keysyms::XKB_KEY_dead_belowcircumflex => Key::Dead(None),
+ keysyms::XKB_KEY_dead_belowtilde => Key::Dead(Some('˷')),
+ keysyms::XKB_KEY_dead_belowbreve => Key::Dead(None),
+ keysyms::XKB_KEY_dead_belowdiaeresis => Key::Dead(None),
+ keysyms::XKB_KEY_dead_invertedbreve => Key::Dead(None),
+ keysyms::XKB_KEY_dead_belowcomma => Key::Dead(None),
+ keysyms::XKB_KEY_dead_a => Key::Dead(Some('a')),
+ keysyms::XKB_KEY_dead_A => Key::Dead(Some('A')),
+ keysyms::XKB_KEY_dead_e => Key::Dead(Some('e')),
+ keysyms::XKB_KEY_dead_E => Key::Dead(Some('E')),
+ keysyms::XKB_KEY_dead_i => Key::Dead(Some('i')),
+ keysyms::XKB_KEY_dead_I => Key::Dead(Some('I')),
+ keysyms::XKB_KEY_dead_o => Key::Dead(Some('o')),
+ keysyms::XKB_KEY_dead_O => Key::Dead(Some('O')),
+ keysyms::XKB_KEY_dead_u => Key::Dead(Some('u')),
+ keysyms::XKB_KEY_dead_U => Key::Dead(Some('U')),
+ keysyms::XKB_KEY_dead_small_schwa => Key::Dead(Some('ə')),
+ keysyms::XKB_KEY_dead_capital_schwa => Key::Dead(Some('Ə')),
+
0 => Key::Unidentified(NativeKeyCode::Unidentified),
_ => Key::Unidentified(NativeKeyCode::XkbSym(keysym)),
}
diff --git a/src/platform_impl/linux/common/xkb_state.rs b/src/platform_impl/linux/common/xkb_state.rs
index b1ff556db40..affbec9a813 100644
--- a/src/platform_impl/linux/common/xkb_state.rs
+++ b/src/platform_impl/linux/common/xkb_state.rs
@@ -1,12 +1,9 @@
-use std::convert::TryInto;
-use std::env;
use std::ffi::CString;
use std::fs::File;
-use std::os::raw::c_char;
+use std::os::raw::{c_char, c_int};
use std::os::unix::ffi::OsStringExt;
-use std::ptr;
use std::sync::atomic::{AtomicBool, Ordering};
-use std::sync::Mutex;
+use std::{char, env, ptr, slice, str};
#[cfg(feature = "wayland")]
use memmap2::MmapOptions;
@@ -19,20 +16,15 @@ use x11_dl::xlib_xcb::xcb_connection_t;
use xkbcommon_dl::x11::XKBCOMMON_X11_HANDLE as XKBXH;
use xkbcommon_dl::{
- self as ffi, xkb_state_component, XKBCOMMON_COMPOSE_HANDLE as XKBCH, XKBCOMMON_HANDLE as XKBH,
+ self as ffi, xkb_compose_status, xkb_state_component, XKBCOMMON_COMPOSE_HANDLE as XKBCH,
+ XKBCOMMON_HANDLE as XKBH,
};
use crate::{
event::ElementState,
- keyboard::{Key, KeyCode, KeyLocation},
+ keyboard::{Key, KeyCode, KeyLocation, ModifiersState},
};
-// TODO: Wire this up without using a static `Mutex