EzeIO.Keylogger
1.1.0
dotnet add package EzeIO.Keylogger --version 1.1.0
NuGet\Install-Package EzeIO.Keylogger -Version 1.1.0
<PackageReference Include="EzeIO.Keylogger" Version="1.1.0" />
<PackageVersion Include="EzeIO.Keylogger" Version="1.1.0" />
<PackageReference Include="EzeIO.Keylogger" />
paket add EzeIO.Keylogger --version 1.1.0
#r "nuget: EzeIO.Keylogger, 1.1.0"
#:package EzeIO.Keylogger@1.1.0
#addin nuget:?package=EzeIO.Keylogger&version=1.1.0
#tool nuget:?package=EzeIO.Keylogger&version=1.1.0
Keyboard
A library that uses the Windows low-level keyboard hook (WH_KEYBOARD_LL) to raise an event when a key is pressed, with COM support.
Targets .NET Framework 4.6.2+ and .NET 8 (net8.0-windows).
Usage
Install the package, then use the namespace:
dotnet add package EzeIO.Keylogger
using Eze.IO.Workspace;
Subscribe to key presses
static void Main(string[] args)
{
DetectKey.OnKeyPressed += OnKeyPress_Handled;
}
static void OnKeyPress_Handled(LoggedKeys keys)
{
VirtualKeys k = keys.Key;
if (k == VirtualKeys.Enter)
{
// User pressed the 'Enter' key
}
}
Adding the first handler installs the hook; removing the last handler (-=) uninstalls it. DetectKey.IsDetecting reports whether the hook is currently installed.
LoggedKeys exposes the pressed key as a VirtualKeys value (Key) and its name (KeyName).
COM
DetectKeyFactory (ProgId Eze.IO.Workspace.DetectKeyFactory) exposes the same event to COM clients such as VBScript or VBA, once the .NET Framework build is registered with regasm /codebase Keyboard.dll. Set Detect to true to start raising OnKeyPressed.
Building
dotnet build Keylogger.sln
dotnet pack src/Keyboard.csproj -c Release -o artifacts
The hook is a Windows API and runs on Windows only.
License
| 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. |
| .NET Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.6.2
- No dependencies.
-
net8.0-windows7.0
- No dependencies.
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.0 | 85 | 10/22/2026 |