private void Unregister() { if (hotKeyValue != 0) { HotKeyUtils.UnregisterKey(this, hotKeyValue); HotKeyUtils.GlobalDeleteAtom(hotKeyValue); } }
private bool Register(string key) { Unregister(); int hotKeyValue = HotKeyUtils.GlobalAddAtom("RE:" + key.ToString()); if (hotKeyValue == 0) { Trace.WriteLine("Could not register atom for hotkey!"); return(false); } return(HotKeyUtils.RegisterKey(this, hotKeyValue, key)); }