diff options
author | 2024-01-16 13:28:00 +0100 | |
---|---|---|
committer | 2024-01-16 13:28:00 +0100 | |
commit | 64d1ce5532f55d152fa5819532a138da2dca1a39 (patch) | |
tree | 1a242bde122b5e715f2e980c5541353e2ae8b048 /examples/editor | |
parent | 534c7dd7b0bc515c31b6de87b4aa6a35b44c46a0 (diff) | |
download | iced-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.rs | 4 |
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, |