Commit 842e616c authored by Dorota Czaplejewicz's avatar Dorota Czaplejewicz
Browse files

Merge branch 'master' into 'master'

Add Mod4 (Windows) key

See merge request !432
parents e6c45a63 a265427e
Pipeline #64310 passed with stages
in 20 minutes and 53 seconds
...@@ -17,6 +17,7 @@ pub enum Modifier { ...@@ -17,6 +17,7 @@ pub enum Modifier {
/// so it's simple to implement as levels are deprecated in squeekboard. /// so it's simple to implement as levels are deprecated in squeekboard.
Control, Control,
Alt, Alt,
Mod4,
} }
/// Action to perform on the keypress and, in reverse, on keyrelease /// Action to perform on the keypress and, in reverse, on keyrelease
......
...@@ -658,6 +658,9 @@ fn create_action<H: logging::Handler>( ...@@ -658,6 +658,9 @@ fn create_action<H: logging::Handler>(
Modifier::Alt => action::Action::ApplyModifier( Modifier::Alt => action::Action::ApplyModifier(
action::Modifier::Alt, action::Modifier::Alt,
), ),
Modifier::Mod4 => action::Action::ApplyModifier(
action::Modifier::Mod4,
),
unsupported_modifier => { unsupported_modifier => {
warning_handler.handle( warning_handler.handle(
logging::Level::Bug, logging::Level::Bug,
......
...@@ -270,6 +270,7 @@ impl Submission { ...@@ -270,6 +270,7 @@ impl Submission {
.map(|(_id, m)| match m { .map(|(_id, m)| match m {
Modifier::Control => Modifiers::CONTROL, Modifier::Control => Modifiers::CONTROL,
Modifier::Alt => Modifiers::MOD1, Modifier::Alt => Modifiers::MOD1,
Modifier::Mod4 => Modifiers::MOD4,
}) })
.fold(Modifiers::empty(), |m, n| m | n); .fold(Modifiers::empty(), |m, n| m | n);
self.virtual_keyboard.set_modifiers_state(raw_modifiers); self.virtual_keyboard.set_modifiers_state(raw_modifiers);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment