Use modified_key for single key bindings in text_input and text_editor

Co-authored-by: Basti Widua <seppel3210@gmail.com>
This commit is contained in:
Héctor Ramón Jiménez 2025-11-29 09:15:19 +01:00
parent 07c6234c0e
commit 4ba180319a
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
2 changed files with 34 additions and 14 deletions

View file

@ -899,7 +899,10 @@ where
}
}
Event::Keyboard(keyboard::Event::KeyPressed {
key, text, ..
key,
text,
modified_key,
..
}) => {
let state = state::<Renderer>(tree);
@ -1040,7 +1043,7 @@ where
key, modifiers,
);
match key.as_ref() {
match modified_key.as_ref() {
keyboard::Key::Named(key::Named::Enter) => {
if let Some(on_submit) = self.on_submit.clone() {
shell.publish(on_submit);