TigerSan.KeyboardMouseHook 1.1.4

dotnet add package TigerSan.KeyboardMouseHook --version 1.1.4
                    
NuGet\Install-Package TigerSan.KeyboardMouseHook -Version 1.1.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TigerSan.KeyboardMouseHook" Version="1.1.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TigerSan.KeyboardMouseHook" Version="1.1.4" />
                    
Directory.Packages.props
<PackageReference Include="TigerSan.KeyboardMouseHook" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TigerSan.KeyboardMouseHook --version 1.1.4
                    
#r "nuget: TigerSan.KeyboardMouseHook, 1.1.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TigerSan.KeyboardMouseHook@1.1.4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TigerSan.KeyboardMouseHook&version=1.1.4
                    
Install as a Cake Addin
#tool nuget:?package=TigerSan.KeyboardMouseHook&version=1.1.4
                    
Install as a Cake Tool

Description:

A WPF library of keyboard hook, mouse hook and combination key.

MouseHook:

Add delegates, and start the hook.

_action: The execution delegation when the mouse is operated.

Start: Start the mouse hook.

It is only necessary to call the Start method once when the program starts.

Stop: top the mouse hook.

KeyboardHook:

Add delegates, and start the hook.

The keyboard hook will stop after locking the screen and restart after unlocking.

_onKeyDown: The delegation of the keyboard key press event.

_onKeyUp: The commission of the keyboard key lifting event

SetHook: Activate the keyboard hook.

UnHook: Uninstall the keyboard hook.

GetKeysString: Get the concatenated string of the set of pressed keys.

CombinationKey:

CombinationKeyType:

Once: Press once.

Double: Press twice.

OnceCtrl: Press Ctrl once

DoubleCtrl: Press Ctrl twice.

OnceCtrlWith: Hold down the Ctrl key and press other key once.

DoubleCtrlWith: Hold down the Ctrl key and press other key twice.

OnceCtrlAltWith: Hold down the Ctrl+Alt and press other key once.

DoubleCtrlAltWith: Hold down the Ctrl+Alt and press other key twice.

CombinationKey:

Combination key data.

_keyDownCounter: The counter for the number of key presses.

_type: Combination key type.

_combinationKeys: Combination key collection.

_action: Execution method.

_actionAsync: Execution method (Asynchronous).

AllowedKeyRange:

Allowed key range.

It must satisfy "KeyMax >= KeyMin".

When KeyMax and KeyMin are equal, it represents a key press.

KeyMax: Maximum value of key.

KeyMin: Minimum value of key.

CombinationKeyHelper:

Support cross-thread UI modification.

Fields:

_dispatcher: Before use, App.Current.Dispatcher should be assigned to _dispatcher!

_onKeyDown: The delegate executed when the keyboard is pressed.

_allowedKeyRanges: A list of the allowed key range.

Properties:

IsStarted: Whether the keyboard hook has been started.

Functions:

Combination key list:

ClearCombinationKeys: Clear the set of combination keys.

AddCombinationKey: Add combination key.

RemoveCombinationKey: Remove combination key.

Keyboard hook:

The SetHook and UnHook methods of KeyboardHook will be called inside the following methods.

StartKeyboardHook: Activate the keyboard hook.

StopKeyboardHook: Disable the keyboard hook.

Key:

GetKeyName: Get key name.

GetKey: Get the key by name.

GetFirstAllowedKey: Get the first allowed key.

IsKey: Determine whether it is a key.

IsBackOrDelete: Determine whether it is the "backspace key" or the "delete key".

IsRangesCorrect: Determine whether the _allowedKeyRanges is correct;

IsAllowedKey: Determine whether it is an allowed key.

Product Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible.  net9.0-windows was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.4 68 9/13/2025
1.1.3 340 7/8/2025