internal static KeyValuePair <int, Win32HotKey> RegisterHotKey(IntPtr mainWindowHandle, VirtualKey key, HotKeyModifiers modifiers) { int id = ++currentHotKeyId; Win32HotKey hotKey = new Win32HotKey(id, mainWindowHandle, key, modifiers); return(new KeyValuePair <int, Win32HotKey>(id, hotKey)); }
internal IHotKey RegisterHotKey(VirtualKey key, HotKeyModifiers modifiers = 0) { KeyValuePair <int, Win32HotKey> hotKeyKeyValuePair = Win32HotKey.RegisterHotKey(_windowHandleSource.Handle, key, modifiers); _registeredHotKeys.Add(hotKeyKeyValuePair.Key, hotKeyKeyValuePair.Value); return(hotKeyKeyValuePair.Value); }