diff --git a/Azazel/MainWindowCommand.cs b/Azazel/MainWindowCommand.cs index 64f32f1..8e244d9 100644 --- a/Azazel/MainWindowCommand.cs +++ b/Azazel/MainWindowCommand.cs @@ -12,6 +12,7 @@ public class MainWindowCommand { private WPFHotkeyManager hotkeyManager; private readonly MainWindowController controller; private MainWindow window; + private readonly Hotkey unchangeableDisplayHotkey = new Hotkey(Modifiers.Alt | Modifiers.Control | Modifiers.Shift, Keys.Space); public MainWindowCommand(VoidDelegate killApplication, AppSettings settings) { var selfPlugin = new SelfPlugin(); @@ -40,6 +41,7 @@ public class MainWindowCommand { hotkeyManager = new WPFHotkeyManager(window); hotkeyManager.Register(displayHotkey); hotkeyManager.Register(killHotkey); + hotkeyManager.Register(unchangeableDisplayHotkey); hotkeyManager.HotkeyPressed += (window1, hotkey) => HandleHotkey(hotkey); } @@ -48,10 +50,11 @@ public class MainWindowCommand { window.Close(); hotkeyManager.Unregister(displayHotkey); hotkeyManager.Unregister(killHotkey); + hotkeyManager.Unregister(unchangeableDisplayHotkey); if (hotkey.Equals(displayHotkey)) Execute(); else if (hotkey.Equals(killHotkey)) killApplication(); } - if (hotkey.Equals(displayHotkey)) window.Activate(); + if (hotkey.Equals(displayHotkey) || hotkey.Equals(unchangeableDisplayHotkey)) window.Activate(); } }