summaryrefslogtreecommitdiffstats
path: root/winit
diff options
context:
space:
mode:
Diffstat (limited to 'winit')
-rw-r--r--winit/src/application.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/winit/src/application.rs b/winit/src/application.rs
index 82478107..f5aa799c 100644
--- a/winit/src/application.rs
+++ b/winit/src/application.rs
@@ -347,6 +347,19 @@ pub trait Application: Sized {
WindowEvent::CloseRequested => {
*control_flow = ControlFlow::Exit;
}
+ #[cfg(target_os = "macos")]
+ WindowEvent::KeyboardInput {
+ input:
+ winit::event::KeyboardInput {
+ virtual_keycode:
+ Some(winit::event::VirtualKeyCode::Q),
+ state: winit::event::ElementState::Pressed,
+ ..
+ },
+ ..
+ } if modifiers.logo() => {
+ *control_flow = ControlFlow::Exit;
+ }
#[cfg(feature = "debug")]
WindowEvent::KeyboardInput {
input: