diff options
author | 2021-12-09 10:58:50 +0100 | |
---|---|---|
committer | 2021-12-09 10:58:50 +0100 | |
commit | b479ba48212c1fb2bd6e6d8bfbb90854983ca393 (patch) | |
tree | e4d2b6886d343360eb7e77d11144cb6037e76433 /native | |
parent | c2eb9d7fbce06e107b315cab9c6d3dfc164c80a1 (diff) | |
download | iced-b479ba48212c1fb2bd6e6d8bfbb90854983ca393.tar.gz iced-b479ba48212c1fb2bd6e6d8bfbb90854983ca393.tar.bz2 iced-b479ba48212c1fb2bd6e6d8bfbb90854983ca393.zip |
Make TextInput emit a Submit message when the key NumpadEnter is pressed
Diffstat (limited to 'native')
-rw-r--r-- | native/src/widget/text_input.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/native/src/widget/text_input.rs b/native/src/widget/text_input.rs index 5e1726db..bec1db48 100644 --- a/native/src/widget/text_input.rs +++ b/native/src/widget/text_input.rs @@ -519,7 +519,8 @@ where let modifiers = self.state.keyboard_modifiers; match key_code { - keyboard::KeyCode::Enter => { + keyboard::KeyCode::Enter + | keyboard::KeyCode::NumpadEnter => { if let Some(on_submit) = self.on_submit.clone() { shell.publish(on_submit); } |