summaryrefslogtreecommitdiffstats
path: root/examples/editor/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/editor/src/main.rs')
-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,