feat: "q" to quit
This commit is contained in:
parent
e3bb0bf327
commit
a8b73da778
1 changed files with 3 additions and 1 deletions
|
|
@ -3,7 +3,7 @@ use std::env;
|
|||
use iced::{
|
||||
Color, Element, Renderer, Subscription, Task, Theme, color, event,
|
||||
keyboard::{self, Key, key},
|
||||
theme, widget,
|
||||
theme, widget, window,
|
||||
};
|
||||
use image::{EncodableLayout, ImageReader, RgbaImage};
|
||||
|
||||
|
|
@ -55,6 +55,8 @@ impl State {
|
|||
}
|
||||
}
|
||||
|
||||
Key::Character("q") => return window::latest().and_then(window::close),
|
||||
|
||||
// ignore unused keys
|
||||
_ => {}
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue