summaryrefslogtreecommitdiffstats
path: root/examples/toast
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2024-01-17 08:12:44 +0100
committerLibravatar GitHub <noreply@github.com>2024-01-17 08:12:44 +0100
commit0001a6d63642b299531ff089f961732a1bfa2339 (patch)
tree7b100257baf72dbceccf5c3343abf3a6b9f1db03 /examples/toast
parentc4ba657de86d7606587dad5124f435141258f570 (diff)
parent985acb2b1532b3e56161bd35201c4a2e21a86b85 (diff)
downloadiced-0001a6d63642b299531ff089f961732a1bfa2339.tar.gz
iced-0001a6d63642b299531ff089f961732a1bfa2339.tar.bz2
iced-0001a6d63642b299531ff089f961732a1bfa2339.zip
Merge pull request #2169 from iced-rs/update-winit
Update `winit` to `0.29`
Diffstat (limited to 'examples/toast')
-rw-r--r--examples/toast/src/main.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/toast/src/main.rs b/examples/toast/src/main.rs
index 300343b9..2e837fa3 100644
--- a/examples/toast/src/main.rs
+++ b/examples/toast/src/main.rs
@@ -1,6 +1,7 @@
use iced::event::{self, Event};
use iced::executor;
use iced::keyboard;
+use iced::keyboard::key;
use iced::widget::{
self, button, column, container, pick_list, row, slider, text, text_input,
};
@@ -93,11 +94,12 @@ impl Application for App {
Command::none()
}
Message::Event(Event::Keyboard(keyboard::Event::KeyPressed {
- key_code: keyboard::KeyCode::Tab,
+ key: keyboard::Key::Named(key::Named::Tab),
modifiers,
+ ..
})) if modifiers.shift() => widget::focus_previous(),
Message::Event(Event::Keyboard(keyboard::Event::KeyPressed {
- key_code: keyboard::KeyCode::Tab,
+ key: keyboard::Key::Named(key::Named::Tab),
..
})) => widget::focus_next(),
Message::Event(_) => Command::none(),