Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

input: Add "ISO level 3 shift" modifier #1365

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading