File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,13 @@ protected override void OnKeyDown(KeyEventArgs e)
120120 return ;
121121 }
122122
123+ // Ctrl+Q quits the application (macOS use hotkeys in system menu bar)
124+ if ( ! OperatingSystem . IsMacOS ( ) && e . KeyModifiers == KeyModifiers . Control && e . Key == Key . Q )
125+ {
126+ App . Quit ( 0 ) ;
127+ return ;
128+ }
129+
123130 if ( e . KeyModifiers . HasFlag ( OperatingSystem . IsMacOS ( ) ? KeyModifiers . Meta : KeyModifiers . Control ) )
124131 {
125132 if ( e . Key == Key . W )
@@ -146,13 +153,6 @@ protected override void OnKeyDown(KeyEventArgs e)
146153 return ;
147154 }
148155
149- if ( e . Key == Key . Q )
150- {
151- App . Quit ( 0 ) ;
152- e . Handled = true ;
153- return ;
154- }
155-
156156 if ( ( OperatingSystem . IsMacOS ( ) && e . KeyModifiers . HasFlag ( KeyModifiers . Alt ) && e . Key == Key . Right ) ||
157157 ( ! OperatingSystem . IsMacOS ( ) && ! e . KeyModifiers . HasFlag ( KeyModifiers . Shift ) && e . Key == Key . Tab ) )
158158 {
You can’t perform that action at this time.
0 commit comments