private static void UnregPrevHotkey(HotKeys.HotKeyCallBackHandler cb) { GlobalHotKey.HotKey prevHotKey; if (HotKeys.IsCallbackExists(cb, out prevHotKey)) { // unregister previous one HotKeys.UnRegist(prevHotKey); } }