diff --git a/docs/changelog.md b/docs/changelog.md index 3e538decb..0f49744c5 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -15,6 +15,7 @@ brief notes about them may accumulate here. * Fixed an issue where large pastes could result in a hang * Updated bundled JetBrainsMono font to version 2.225 * Fixed an issue where the window would be redrawn on mouse move. This was most noticeable as a laggy mouse pointer when moving the mouse across a window running on the nouveau display driver on X11 and Wayland systems +* Wayland: the raw key modifiers are now correctly propagated so that they activate when used with key assignments using the `key = "raw:123"` binding syntax. ### 20210203-095643-70a364eb diff --git a/window/src/os/wayland/window.rs b/window/src/os/wayland/window.rs index 5aa33566a..69c589fa5 100644 --- a/window/src/os/wayland/window.rs +++ b/window/src/os/wayland/window.rs @@ -285,10 +285,10 @@ impl WaylandWindowInner { pair => pair, }; - let (modifiers, raw_modifiers) = if raw_key.is_some() { - (Modifiers::NONE, self.modifiers) + let modifiers = if raw_key.is_some() { + Modifiers::NONE } else { - (self.modifiers, Modifiers::NONE) + self.modifiers }; let key_event = KeyEvent { @@ -296,7 +296,7 @@ impl WaylandWindowInner { key, raw_key, modifiers, - raw_modifiers, + raw_modifiers: self.modifiers, raw_code: Some(raw_code), repeat_count: 1, }