![]() |
VOOZH | about |
dotnet add package HidApi.Net --version 1.2.0
NuGet\Install-Package HidApi.Net -Version 1.2.0
<PackageReference Include="HidApi.Net" Version="1.2.0" />
<PackageVersion Include="HidApi.Net" Version="1.2.0" />Directory.Packages.props
<PackageReference Include="HidApi.Net" />Project file
paket add HidApi.Net --version 1.2.0
#r "nuget: HidApi.Net, 1.2.0"
#:package HidApi.Net@1.2.0
#addin nuget:?package=HidApi.Net&version=1.2.0Install as a Cake Addin
#tool nuget:?package=HidApi.Net&version=1.2.0Install as a Cake Tool
👁 Build Status
👁 NuGet
👁 License (MIT)
Welcome to HidApi.Net a modern cross platform C# binding for the C HIDAPI library. Supported platforms are Linux, OSX and Windows.
Supported HIDAPI version: Up to 0.15
To use the library please reference the nuget package in your project. Additionally it is required to either ensure that HIDAPI is available on the host system or is distributed as part of your application.
To get an overview of the API please refer to the API documentation.
You can use the Hid class to enumerate over devices or directly use the device class to connect to a known device:
foreach(var deviceInfo in Hid.Enumerate())
{
using var device = deviceInfo.ConnectToDevice();
Console.WriteLine(device.GetManufacturer());
}
Hid.Exit(); //Call at the end of your program
var device = new Device(0x00, 0x00); //Fill vendor id and product id
Console.WriteLine(device.GetManufacturer());
Hid.Exit(); //Call at the end of your program
In order to access HID devices as an unprivileged user an udev rule must be installed on the host system. Please refer to the sample udev file of the HIDAPI project.
If the application targets at least .NET 8 the nuget package allows applications to be published as Native AOT as itself is AOT compatible.
To build the solution locally execute the following commands:
$ git clone https://github.com/badcel/HidApi.Net.git
$ cd HidApi.Net/src
$ dotnet build
HidApi.Net is licensed under the terms of the MIT-License. Please see the license file for further information.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 4 NuGet packages that depend on HidApi.Net:
| Package | Downloads |
|---|---|
|
Arendi.DotNETLibrary.Serial.Hidapi.Net
Arendi.DotNETLibrary - Serial communication extension for Hidapi.Net |
|
|
Haukcode.StreamDeck
Transport-agnostic .NET library for Elgato Stream Deck devices. Single IStreamDeckDevice interface works whether the deck is on USB HID or behind an Elgato Network Dock. Includes mDNS discovery (_elg._tcp), USB HID enumeration, encoder support (Stream Deck Plus), and ImageSharp-based key image encoding. |
|
|
Zenon.Wallet.Ledger
Ledger wallet for the Zenon .NET SDK |
|
|
ElgatoStreamDeck
C# Library for Accessing the Elgato Stream Deck device through USB connection. |
Showing the top 1 popular GitHub repositories that depend on HidApi.Net:
| Repository | Stars |
|---|---|
|
maker-community/ElectronBot.DotNet
一个为ElectronBot机器人和瀚文键盘(HelloWorldKeyboard)开发的上位机软件(包含机器人USB操作SDK和瀚文键盘HID操作SDK),采用Windows App SDK框架编写界面。 A host computer software developed for ElectronBot robots (including robot USB operation SDK), using the Windows App SDK framework to write UI.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 1.2.0 | 13,967 | 7/16/2025 |
| 1.1.0 | 9,481 | 8/18/2024 |
| 1.0.4 | 1,894 | 6/17/2024 |
| 1.0.3 | 1,379 | 5/26/2024 |
| 1.0.2 | 2,197 | 2/24/2024 |
| 1.0.1 | 1,649 | 1/13/2024 |
| 1.0.0 | 2,954 | 11/25/2023 |
| 0.4.0 | 1,608 | 5/31/2023 |
| 0.3.0 | 758 | 2/17/2023 |
| 0.2.1 | 526 | 12/17/2022 |
| 0.2.0 | 560 | 10/27/2022 |
| 0.1.1 | 650 | 10/9/2022 |
| 0.1.0 | 594 | 10/7/2022 |