handling weird keyboard stuff
This commit is contained in:
parent
ddc8076734
commit
eebeb478d2
|
@ -104,7 +104,10 @@ pub(crate) fn run_mapedit() {
|
||||||
match event {
|
match event {
|
||||||
Event::WindowEvent { event, .. } => match event {
|
Event::WindowEvent { event, .. } => match event {
|
||||||
WindowEvent::KeyboardInput { input, .. } => {
|
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) => {
|
(winit::event::ElementState::Pressed, VirtualKeyCode::Escape) => {
|
||||||
*control_flow = ControlFlow::Exit;
|
*control_flow = ControlFlow::Exit;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue