From e5f006818df7ebb92d206985f45e713ba1e9c1c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20St=C3=BChrk?= Date: Sun, 17 Mar 2024 11:56:39 +0100 Subject: [PATCH] input: Add "ISO level 3 shift" modifier --- src/input/keyboard/modifiers_state.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/input/keyboard/modifiers_state.rs b/src/input/keyboard/modifiers_state.rs index b5788adc4240..3383c228408b 100644 --- a/src/input/keyboard/modifiers_state.rs +++ b/src/input/keyboard/modifiers_state.rs @@ -22,6 +22,10 @@ pub struct ModifiersState { pub logo: bool, /// The "Num lock" key pub num_lock: bool, + /// The "ISO level 3 shift" key + /// + /// Also known as the "AltGr" key + pub iso_level3_shift: bool, /// Serialized modifier state, as send e.g. by the wl_keyboard protocol pub serialized: SerializedMods, @@ -36,6 +40,8 @@ impl ModifiersState { self.caps_lock = state.mod_name_is_active(&xkb::MOD_NAME_CAPS, xkb::STATE_MODS_EFFECTIVE); self.logo = state.mod_name_is_active(&xkb::MOD_NAME_LOGO, xkb::STATE_MODS_EFFECTIVE); self.num_lock = state.mod_name_is_active(&xkb::MOD_NAME_NUM, xkb::STATE_MODS_EFFECTIVE); + self.iso_level3_shift = + state.mod_name_is_active(&xkb::MOD_NAME_ISO_LEVEL3_SHIFT, xkb::STATE_MODS_EFFECTIVE); self.serialized = serialize_modifiers(state); } }