public void Unregister(HotKey hotKey) { int id; if (_registered.TryGetValue(hotKey, out id)) { WinApi.UnregisterHotKey(_windowHandleSource.Handle, id); _registered.Remove(hotKey); } }
public static void UnregisterGlobalHotkey(HotKeyManager hkManager, LoadedGlobalHotkey hotkey) { if (hotkey.SecondModifierKey != ModifierKeys.None) { hkManager.Unregister(hotkey.Hotkey, hotkey.FirstModifierKey | hotkey.SecondModifierKey); } else { hkManager.Unregister(hotkey.Hotkey, hotkey.FirstModifierKey); } }