fix(detect): fix incorrect modifier sync on Wayland

This commit is contained in:
Federico Terzi 2021-07-30 19:49:03 +02:00
parent bee79eb4a4
commit 93a7caa101

View File

@ -211,12 +211,14 @@ impl Device {
}
if modifiers_state.num_lock {
self.update_key(*modifiers_map.get("num_lock").expect("unable to find modifiers key in map"), true);
self.update_key(*modifiers_map.get("num_lock").expect("unable to find modifiers key in map"), false);
}
if modifiers_state.shift {
self.update_key(*modifiers_map.get("shift").expect("unable to find modifiers key in map"), true);
}
if modifiers_state.caps_lock {
self.update_key(*modifiers_map.get("caps_lock").expect("unable to find modifiers key in map"), true);
self.update_key(*modifiers_map.get("caps_lock").expect("unable to find modifiers key in map"), false);
}
}
}