public bool RegisterHotkey(IntPtr handle, Hotkey hotkey) { var result = HotkeyUtil.RegisterSystemHotKey(handle, hotkey); if (result) { registry.Add(hotkey.Id, hotkey); } return(result); }
public bool UnregisterHotkey(IntPtr handle, Hotkey hotkey) { var result = HotkeyUtil.UnregisterSystemHotKey(handle, hotkey); if (result) { registry.Remove(hotkey.Id); } return(result); }
public Hotkey(ClipboardAction action, Keys numberKey) { Action = action; Id = HotkeyUtil.GetNextHotKeyId(); if (Action == ClipboardAction.PASTE) { Modifier = Modifier | HotkeyUtil.ALT_MODIFIER_KEY; } Number = numberKey; }