fix: do NOT quit when try to input @ via Alt Gr+Q with German ISO keyboard layout (#970)

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-02-11 18:57:54 +08:00
parent e9d16a5102
commit 21cfd17cdb
No known key found for this signature in database

View file

@ -120,6 +120,13 @@ namespace SourceGit.Views
return;
}
// Ctrl+Q quits the application (macOS use hotkeys in system menu bar)
if (!OperatingSystem.IsMacOS() && e.KeyModifiers == KeyModifiers.Control && e.Key == Key.Q)
{
App.Quit(0);
return;
}
if (e.KeyModifiers.HasFlag(OperatingSystem.IsMacOS() ? KeyModifiers.Meta : KeyModifiers.Control))
{
if (e.Key == Key.W)
@ -146,13 +153,6 @@ namespace SourceGit.Views
return;
}
if (e.Key == Key.Q)
{
App.Quit(0);
e.Handled = true;
return;
}
if ((OperatingSystem.IsMacOS() && e.KeyModifiers.HasFlag(KeyModifiers.Alt) && e.Key == Key.Right) ||
(!OperatingSystem.IsMacOS() && !e.KeyModifiers.HasFlag(KeyModifiers.Shift) && e.Key == Key.Tab))
{