From eebeb478d2f73135653b49caa937bce4764e4009 Mon Sep 17 00:00:00 2001 From: dani <> Date: Sat, 5 Aug 2023 15:01:38 +0000 Subject: [PATCH] handling weird keyboard stuff --- src/mapedit.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mapedit.rs b/src/mapedit.rs index 4d4730f..cd17007 100644 --- a/src/mapedit.rs +++ b/src/mapedit.rs @@ -104,7 +104,10 @@ pub(crate) fn run_mapedit() { match event { Event::WindowEvent { event, .. } => match event { WindowEvent::KeyboardInput { input, .. } => { - match (input.state, input.virtual_keycode.unwrap()) { + match ( + input.state, + input.virtual_keycode.unwrap_or(VirtualKeyCode::F24), + ) { (winit::event::ElementState::Pressed, VirtualKeyCode::Escape) => { *control_flow = ControlFlow::Exit; }