make dead keys work w/out breaking ctrl mappings (#767)

macos-click-through
smolck 3 years ago committed by GitHub
parent fd27e059f0
commit bc1009babc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -18,7 +18,6 @@ fn use_logo(_: bool) -> bool {
false
}
#[cfg(not(target_os = "macos"))]
fn use_alt(alt: bool) -> bool {
alt
@ -166,7 +165,10 @@ impl KeyboardManager {
.send(UiCommand::Keyboard(keybinding_string))
.expect("Could not send keyboard ui command");
} else {
let key_text = if self.alt && cfg!(target_os = "macos") {
let is_dead_key = key_event.text_with_all_modifiers().is_some()
&& key_event.text.is_none();
let key_text =
if (self.alt || is_dead_key) && cfg!(target_os = "macos") {
key_event.text_with_all_modifiers()
} else {
key_event.text

Loading…
Cancel
Save