summaryrefslogtreecommitdiffstats
path: root/examples/editor
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-01-16 13:28:00 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-01-16 13:28:00 +0100
commit64d1ce5532f55d152fa5819532a138da2dca1a39 (patch)
tree1a242bde122b5e715f2e980c5541353e2ae8b048 /examples/editor
parent534c7dd7b0bc515c31b6de87b4aa6a35b44c46a0 (diff)
downloadiced-64d1ce5532f55d152fa5819532a138da2dca1a39.tar.gz
iced-64d1ce5532f55d152fa5819532a138da2dca1a39.tar.bz2
iced-64d1ce5532f55d152fa5819532a138da2dca1a39.zip
Refactor `KeyCode` into `Key` and `Location`
Diffstat (limited to 'examples/editor')
-rw-r--r--examples/editor/src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/editor/src/main.rs b/examples/editor/src/main.rs
index 03d1e283..bf2aaaa3 100644
--- a/examples/editor/src/main.rs
+++ b/examples/editor/src/main.rs
@@ -134,8 +134,8 @@ impl Application for Editor {
}
fn subscription(&self) -> Subscription<Message> {
- keyboard::on_key_press(|key_code, modifiers| match key_code {
- keyboard::KeyCode::S if modifiers.command() => {
+ keyboard::on_key_press(|key, modifiers| match key.as_ref() {
+ keyboard::Key::Character("s") if modifiers.command() => {
Some(Message::SaveFile)
}
_ => None,