From d5dcc4f00f17aa618293b55c57a0cd81f1f3f558 Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Thu, 28 Nov 2024 18:55:26 -0500 Subject: [PATCH] Add escape as an alternative to back hotkey --- objdiff-gui/src/hotkeys.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/objdiff-gui/src/hotkeys.rs b/objdiff-gui/src/hotkeys.rs index 72177b1..e68571b 100644 --- a/objdiff-gui/src/hotkeys.rs +++ b/objdiff-gui/src/hotkeys.rs @@ -20,7 +20,9 @@ pub fn back_pressed(ctx: &Context) -> bool { return false; } ctx.input_mut(|i| { - i.key_pressed(Key::Backspace) || i.pointer.button_pressed(PointerButton::Extra1) + i.key_pressed(Key::Backspace) + || i.key_pressed(Key::Escape) + || i.pointer.button_pressed(PointerButton::Extra1) }) }