Skip to content

Commit

Permalink
input: Add "ISO level 3 shift" modifier
Browse files Browse the repository at this point in the history
  • Loading branch information
Trundle authored and Drakulix committed Mar 21, 2024
1 parent 8e49b9b commit e5f0068
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/input/keyboard/modifiers_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);
}
}
Expand Down

0 comments on commit e5f0068

Please sign in to comment.