/// <summary> /// Register a new global hot key. This will throw an exception if the hot /// key is already registered. /// </summary> /// <param name="modifiedKey">The modified key.</param> /// <param name="HotKeyCallback">A callback that will be invoked when the HotKey is pressed.</param> public void Register(ModifiedKey modifiedKey, HotKeyCallback hotKeyCallback) { modifiedKey.ThrowIfNull("modifiedKey"); hotKeyCallback.ThrowIfNull("hotKeyCallback"); Register(modifiedKey.Modifiers, modifiedKey.Key, hotKeyCallback); }
/// <summary> /// Unregisters a single global hot key. /// </summary> /// <param name="modifiedKey">The <code>ModifiedKey</code> to unregister.</param> public void Unregister(ModifiedKey modifiedKey) { modifiedKey.ThrowIfNull("key"); Unregister(modifiedKey.Modifiers, modifiedKey.Key); }