Skip to content

Commit 21cfd17

Browse files
committed
fix: do NOT quit when try to input @ via Alt Gr+Q with German ISO keyboard layout (#970)
Signed-off-by: leo <[email protected]>
1 parent e9d16a5 commit 21cfd17

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/Views/Launcher.axaml.cs

+7-7
Original file line numberDiff line numberDiff 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
{

0 commit comments

Comments
 (0)