From 3c180e8f72e5d1bebc2bbf5ce22092dccce9cf76 Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Sun, 16 Mar 2025 19:44:02 +0000 Subject: [PATCH] Allow `Ctrl+Q` Shortcut to Close --- Source/HedgeModManager.UI/Views/MainWindow.axaml.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/HedgeModManager.UI/Views/MainWindow.axaml.cs b/Source/HedgeModManager.UI/Views/MainWindow.axaml.cs index 4b34d27..6e4ba1c 100644 --- a/Source/HedgeModManager.UI/Views/MainWindow.axaml.cs +++ b/Source/HedgeModManager.UI/Views/MainWindow.axaml.cs @@ -98,6 +98,7 @@ private void OnKeyDown(object? sender, KeyEventArgs e) bool toggleFullscreen = e.KeyModifiers == KeyModifiers.Alt && e.Key == Key.Enter; bool isShift = e.KeyModifiers.HasFlag(KeyModifiers.Shift); bool isAlt = e.KeyModifiers.HasFlag(KeyModifiers.Alt); + bool isQuit = e.KeyModifiers == KeyModifiers.Control && e.Key == Key.Q; if (ViewModel == null) return; @@ -217,6 +218,10 @@ private void OnKeyDown(object? sender, KeyEventArgs e) ViewModel.WindowState = WindowState.FullScreen; ViewModel.Config.LastWindowState = ViewModel.WindowState; } + else if (isQuit) + { + Close(); + } } private void OnDragOver(object? sender, DragEventArgs e)