public static void UnregisterHotKey(CaptureMode mode) { if (Handle == IntPtr.Zero) { return; } if (!HotKeys.ContainsKey(mode)) { return; } var hotKey = HotKeys[mode]; if (hotKey == null) { return; } if (WindowNative.UnregisterHotKey(Handle, (int)mode)) { hotKey.IsRegistered = false; } }