Example #1
0
 private void Unregister()
 {
     if (hotKeyValue != 0)
     {
         HotKeyUtils.UnregisterKey(this, hotKeyValue);
         HotKeyUtils.GlobalDeleteAtom(hotKeyValue);
     }
 }
Example #2
0
        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));
        }