C# Class MouseKeyboardActivityMonitor.HotKeys.HotKeySet

An immutable set of Hot Keys that provides an event for when the set is activated.
Mostra file Open project: katopz/oskz-vcsharp

Public Methods

Method Description
HotKeySet ( IEnumerable hotkeys ) : System

Creates an instance of the HotKeySet class. Once created, the keys cannot be changed.

RegisterExclusiveOrKey ( IEnumerable orKeySet ) : Keys

Registers a group of Keys that are already part of the HotKeySet in order to provide better flexibility among keys. HotKeySet hks = new HotKeySet( new [] { Keys.T, Keys.LShiftKey, Keys.RShiftKey } ); RegisterExclusiveOrKey( new [] { Keys.LShiftKey, Keys.RShiftKey } ); allows either Keys.LShiftKey or Keys.RShiftKey to be combined with Keys.T.

UnregisterExclusiveOrKey ( Keys anyKeyInTheExclusiveOrSet ) : bool

Unregisters a previously set exclusive or based on the primary key.

Private Methods

Method Description
GetExclusiveOrPrimaryKey ( Keys k ) : Keys

Gets the primary key

GetPrimaryKey ( Keys k ) : Keys

Resolves obtaining the key used for state checking.

InitializeKeys ( ) : void

Adds the keys into the dictionary tracking the keys and gets the real-time status of the Keys from the OS

InvokeHotKeyHandler ( HotKeyHandler hotKeyDelegate ) : void

General invocation handler

OnKey ( KeyEventArgsExt kex ) : void

OnKeyDown ( Keys k ) : void
OnKeyUp ( Keys k ) : void

Method Details

HotKeySet() public method

Creates an instance of the HotKeySet class. Once created, the keys cannot be changed.
public HotKeySet ( IEnumerable hotkeys ) : System
hotkeys IEnumerable Set of Hot Keys
return System

RegisterExclusiveOrKey() public method

Registers a group of Keys that are already part of the HotKeySet in order to provide better flexibility among keys. HotKeySet hks = new HotKeySet( new [] { Keys.T, Keys.LShiftKey, Keys.RShiftKey } ); RegisterExclusiveOrKey( new [] { Keys.LShiftKey, Keys.RShiftKey } ); allows either Keys.LShiftKey or Keys.RShiftKey to be combined with Keys.T.
public RegisterExclusiveOrKey ( IEnumerable orKeySet ) : Keys
orKeySet IEnumerable
return Keys

UnregisterExclusiveOrKey() public method

Unregisters a previously set exclusive or based on the primary key.
public UnregisterExclusiveOrKey ( Keys anyKeyInTheExclusiveOrSet ) : bool
anyKeyInTheExclusiveOrSet Keys Any key used in the Registration method used to create an exclusive or set
return bool