mirror of
https://github.com/Noratrieb/clippyboard.git
synced 2026-01-14 09:55:04 +01:00
escape
This commit is contained in:
parent
8761b14917
commit
06b5244638
1 changed files with 4 additions and 0 deletions
|
|
@ -24,6 +24,10 @@ impl eframe::App for App {
|
|||
fn update(&mut self, ctx: &egui::Context, _: &mut eframe::Frame) {
|
||||
egui::CentralPanel::default().show(ctx, |ui| {
|
||||
ui.input(|i| {
|
||||
if i.key_down(egui::Key::Escape) {
|
||||
std::process::exit(0);
|
||||
}
|
||||
|
||||
if i.key_pressed(egui::Key::J) || i.key_pressed(egui::Key::ArrowDown) {
|
||||
if self.selected_idx + 1 != self.items.len() {
|
||||
self.selected_idx += 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue