fix another issue

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

@ -165,19 +165,27 @@ 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 {
// This is not a control key, so we rely upon winit to determine if let key_text = if self.alt && cfg!(target_os = "macos") {
// this is a deadkey or not. key_event.text_with_all_modifiers()
let keybinding_string = } else {
if let Some(escaped_text) = is_special(key_text) { key_event.text
self.format_keybinding_string(true, false, escaped_text) };
} else {
self.format_keybinding_string(false, false, key_text) if let Some(key_text) = key_text {
}; // This is not a control key, so we rely upon winit to determine if
// this is a deadkey or not.
self.command_sender let keybinding_string =
.send(UiCommand::Keyboard(keybinding_string)) if let Some(escaped_text) = is_special(key_text) {
.expect("Could not send keyboard ui command"); self.format_keybinding_string(true, false, escaped_text)
} else {
self.format_keybinding_string(false, false, key_text)
};
self.command_sender
.send(UiCommand::Keyboard(keybinding_string))
.expect("Could not send keyboard ui command");
}
} }
} }
} }

Loading…
Cancel
Save