Bio 2.1.7

.NET 6.0
dotnet add package Bio --version 2.1.7
NuGet\Install-Package Bio -Version 2.1.7
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="Bio" Version="2.1.7" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Bio --version 2.1.7
#r "nuget: Bio, 2.1.7"
#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.
// Install Bio as a Cake Addin
#addin nuget:?package=Bio&version=2.1.7

// Install Bio as a Cake Tool
#tool nuget:?package=Bio&version=2.1.7


Full control of input on any level.

✅ Why choose Bio?

Bio allows monitoring keyboard input on any level of abstraction. It provides an easy-to-use wrapper for the native Win32 low-level keyboard hook as well as the class for working with detected input in a sophisticated way with a rich set of information about each input event.

🔩 Usage

Low-level Hook

using Bio;

using var hook = new KeyboardHook();
hook.KeyDown += Hook_HandleLowLevelInputMessage;
hook.KeyUp += Hook_HandleLowLevelInputMessage;

void Hook_HandleLowLevelInputMessage(object? sender, KeyboardInputMessage e)
    var wm = e.WM;
    var lowLevelKeyInfo = e.KBDLLHOOKSTRUCT;

High-level Input Detector

using Bio;
using Bio.Win32;

using var keySpy = new KeySpy();
keySpy.InputDetected += KeySpy_HandleHighLevelInputEvent;

void KeySpy_HandleHighLevelInputEvent(object? sender, KeyInfo e)
    // KeyInfo is basically an advanced version of ConsoleKeyInfo that supports all keys and can differentiate between left and right modifier keys.
    VK vkCode = e.VK;
    char keyChar = e.KeyChar;
    ConsoleKey consoleKey = e.ConsoleKey;
    ModifierKeys modifierKeys = e.ModifierKeys;

Input Synthesizer

using Bio;
using Bio.Win32;

KeyboardInput.SynthesizePress(VK.LSHIFT, VK.KEY_A);
KeyboardInput.Synthesize(WM.KEYDOWN, VK.KEY_0);
KeyboardInput.Synthesize(WM.KEYUP, VK.KEY_0);

💿 Installation

Download page

For guidance on how to install NuGet packages refer here and here.

💡 Suggestions

If you would like to see some additional functionality that isn't provided by this library yet, feel free to leave your proposals in Issues section. Any feedback is highly appreciated.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed. 
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.
  • net6.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
2.1.7 377 5/6/2022