fix another issue

macos-click-through
Keith Simmons 3 years ago
parent 792a6b80b0
commit fd27e059f0

@ -165,7 +165,14 @@ impl KeyboardManager {
self.command_sender self.command_sender
.send(UiCommand::Keyboard(keybinding_string)) .send(UiCommand::Keyboard(keybinding_string))
.expect("Could not send keyboard ui command"); .expect("Could not send keyboard ui command");
} else if let Some(key_text) = key_event.text_with_all_modifiers() { } else {
let key_text = if self.alt && cfg!(target_os = "macos") {
key_event.text_with_all_modifiers()
} else {
key_event.text
};
if let Some(key_text) = key_text {
// This is not a control key, so we rely upon winit to determine if // This is not a control key, so we rely upon winit to determine if
// this is a deadkey or not. // this is a deadkey or not.
let keybinding_string = let keybinding_string =
@ -182,6 +189,7 @@ impl KeyboardManager {
} }
} }
} }
}
// Regardless of whether this was a valid keyboard input or not, rest ignoring and // Regardless of whether this was a valid keyboard input or not, rest ignoring and
// whatever event was queued. // whatever event was queued.

Loading…
Cancel
Save