C# Class GlobalHotKey.HotKeyManager

Setups system-wide hot keys and provides possibility to react on their events.
Inheritance: IDisposable
Show file Open project: kirmir/GlobalHotKey Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

HotKeyManager ( ) : System

Initializes a new instance of the HotKeyManager class.

Register ( Key key, ModifierKeys modifiers ) : System.Windows.Input.HotKey

Registers the system-wide hot key.

Register ( System.Windows.Input.HotKey hotKey ) : void

Registers the system-wide hot key.

Unregister ( System.Windows.Input.HotKey hotKey ) : void

Unregisters previously registered hot key.

Unregister ( Key key, ModifierKeys modifiers ) : void

Unregisters previously registered hot key.

Private Methods

Method Description
getFreeKeyId ( ) : int
messagesHandler ( IntPtr handle, int message, IntPtr wParam, IntPtr lParam, bool &handled ) : IntPtr
onKeyPressed ( KeyPressedEventArgs e ) : void

Method Details

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

HotKeyManager() public method

Initializes a new instance of the HotKeyManager class.
public HotKeyManager ( ) : System
return System

Register() public method

Registers the system-wide hot key.
public Register ( Key key, ModifierKeys modifiers ) : System.Windows.Input.HotKey
key Key The key.
modifiers ModifierKeys The key modifiers.
return System.Windows.Input.HotKey

Register() public method

Registers the system-wide hot key.
public Register ( System.Windows.Input.HotKey hotKey ) : void
hotKey System.Windows.Input.HotKey The hot key.
return void

Unregister() public method

Unregisters previously registered hot key.
public Unregister ( System.Windows.Input.HotKey hotKey ) : void
hotKey System.Windows.Input.HotKey The registered hot key.
return void

Unregister() public method

Unregisters previously registered hot key.
public Unregister ( Key key, ModifierKeys modifiers ) : void
key Key The key.
modifiers ModifierKeys The key modifiers.
return void