0.0.9 • Published 10 months ago

linux-uhid v0.0.9

Weekly downloads
-
License
GNU
Repository
github
Last release
10 months ago

linux-uhid - NodeJS bindings for Linux's UHID interface

npm version License: GNU

linux-uhid is a NodeJS module that provides bindings for Linux's UHID interface. It allows you to create virtual HID devices and send input reports to them.

NOTE: Module has to be used with elevated privileges (root)!

Installation

You can install linux-uhid via npm:

npm install linux-uhid

Usage

import { UHIDDevice } from 'linux-uhid';

var device = new UHIDDevice();

device.open();

device.create( {
	name: "node-uhid-device",
	data: Buffer.from( hid_descriptor ),
	bus: UHIDBusType.USB,
	vendor: 0x15d9,
	product: 0x0a37,
	version: 0x0001,
	country: 0x00
} );

// Send input report
device.input( Buffer.from( hid_input_report ));

Look at test.ts for an example of a mouse.

Documentation

https://onesandzer0s.github.io/linux-uhid/

TODO

  • Add documentation.
  • Add TypeScript support.
  • Look into adding support for reading /sys/kernel/debug/hid//rdesc
0.0.9

10 months ago

0.0.8

10 months ago

0.0.7

10 months ago

0.0.6

10 months ago

0.0.5

10 months ago

0.0.4

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago

0.0.0

10 months ago