handling weird keyboard stuff

This commit is contained in:
dani 2023-08-05 15:01:38 +00:00
parent ddc8076734
commit eebeb478d2
1 changed files with 4 additions and 1 deletions

View File

@ -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;
}