Merge branch 'master' into 'master'

Add Mod4 (Windows) key

See merge request Librem5/squeekboard!432
This commit is contained in:
Dorota Czaplejewicz
2021-02-11 17:44:02 +00:00
3 changed files with 5 additions and 0 deletions

View File

@ -17,6 +17,7 @@ pub enum Modifier {
/// so it's simple to implement as levels are deprecated in squeekboard.
Control,
Alt,
Mod4,
}
/// Action to perform on the keypress and, in reverse, on keyrelease

View File

@ -658,6 +658,9 @@ fn create_action<H: logging::Handler>(
Modifier::Alt => action::Action::ApplyModifier(
action::Modifier::Alt,
),
Modifier::Mod4 => action::Action::ApplyModifier(
action::Modifier::Mod4,
),
unsupported_modifier => {
warning_handler.handle(
logging::Level::Bug,

View File

@ -270,6 +270,7 @@ impl Submission {
.map(|(_id, m)| match m {
Modifier::Control => Modifiers::CONTROL,
Modifier::Alt => Modifiers::MOD1,
Modifier::Mod4 => Modifiers::MOD4,
})
.fold(Modifiers::empty(), |m, n| m | n);
self.virtual_keyboard.set_modifiers_state(raw_modifiers);