enhance: clear unhandled modifiers at begining of OnKeyDown

This commit is contained in:
leo 2024-08-26 11:00:03 +08:00
parent ac95fac443
commit ead2af7d65
No known key found for this signature in database

View file

@ -83,6 +83,9 @@ namespace SourceGit.Views
if (vm == null) if (vm == null)
return; return;
// We should clear all unhandled key modifiers.
_unhandledModifiers = KeyModifiers.None;
// Ctrl+Shift+P opens preference dialog (macOS use hotkeys in system menu bar) // Ctrl+Shift+P opens preference dialog (macOS use hotkeys in system menu bar)
if (!OperatingSystem.IsMacOS() && e.KeyModifiers == (KeyModifiers.Control | KeyModifiers.Shift) && e.Key == Key.P) if (!OperatingSystem.IsMacOS() && e.KeyModifiers == (KeyModifiers.Control | KeyModifiers.Shift) && e.Key == Key.P)
{ {