TigerSan.KeyboardMouseHook
1.1.4
dotnet add package TigerSan.KeyboardMouseHook --version 1.1.4
NuGet\Install-Package TigerSan.KeyboardMouseHook -Version 1.1.4
<PackageReference Include="TigerSan.KeyboardMouseHook" Version="1.1.4" />
<PackageVersion Include="TigerSan.KeyboardMouseHook" Version="1.1.4" />
<PackageReference Include="TigerSan.KeyboardMouseHook" />
paket add TigerSan.KeyboardMouseHook --version 1.1.4
#r "nuget: TigerSan.KeyboardMouseHook, 1.1.4"
#:package TigerSan.KeyboardMouseHook@1.1.4
#addin nuget:?package=TigerSan.KeyboardMouseHook&version=1.1.4
#tool nuget:?package=TigerSan.KeyboardMouseHook&version=1.1.4
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 | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0-windows7.0 is compatible. net9.0-windows was computed. net10.0-windows was computed. |
-
net8.0-windows7.0
- TigerSan.CsvLog (>= 1.2.0)
- TigerSan.TimerHelper (>= 1.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.