File tree 1 file changed +7
-7
lines changed
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)
120
120
return ;
121
121
}
122
122
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
+
123
130
if ( e . KeyModifiers . HasFlag ( OperatingSystem . IsMacOS ( ) ? KeyModifiers . Meta : KeyModifiers . Control ) )
124
131
{
125
132
if ( e . Key == Key . W )
@@ -146,13 +153,6 @@ protected override void OnKeyDown(KeyEventArgs e)
146
153
return ;
147
154
}
148
155
149
- if ( e . Key == Key . Q )
150
- {
151
- App . Quit ( 0 ) ;
152
- e . Handled = true ;
153
- return ;
154
- }
155
-
156
156
if ( ( OperatingSystem . IsMacOS ( ) && e . KeyModifiers . HasFlag ( KeyModifiers . Alt ) && e . Key == Key . Right ) ||
157
157
( ! OperatingSystem . IsMacOS ( ) && ! e . KeyModifiers . HasFlag ( KeyModifiers . Shift ) && e . Key == Key . Tab ) )
158
158
{
You can’t perform that action at this time.
0 commit comments