Fix macOS shortcut handling in text_input and text_editor

This commit is contained in:
Héctor Ramón Jiménez 2025-11-29 09:24:03 +01:00
parent 4ba180319a
commit d66cf51ad2
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
2 changed files with 25 additions and 27 deletions

View file

@ -1039,9 +1039,14 @@ where
}
#[cfg(target_os = "macos")]
let key = crate::text_editor::convert_macos_shortcut(
key, modifiers,
);
let macos_shortcut =
crate::text_editor::convert_macos_shortcut(
key, modifiers,
);
#[cfg(target_os = "macos")]
let modified_key =
macos_shortcut.as_ref().unwrap_or(modified_key);
match modified_key.as_ref() {
keyboard::Key::Named(key::Named::Enter) => {