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:
parent
07c6234c0e
commit
4ba180319a
2 changed files with 34 additions and 14 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue