New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

hideous

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hideous

hotplugging for node-hid

latest
Source
npmnpm
Version
0.0.9
Version published
Maintainers
1
Created
Source

hideous

hotplug for node-hid.

usage


var hideous = require("hideous");

hideous({

	// scan for new devices
	scan: true,

	// poll interval for scans
	interval: "10s",

	// connect to discovered devices
	attach: true,

	// filter devices by properties from `node-hid`
	filter: {
		vendorId: 1452,
		productId: 610,
		path: /Keyboard/, // can be regular expresson for string values
		serialNumber: '',
		manufacturer: /Apple/,
		product: 'Apple Internal Keyboard / Trackpad',
		release: 549,
		interface: -1,
		usagePage: 1,
		usage: 6 },
	}

}).on("connect", function(device){

	console.log("connect");

}).on("disconnect", function(device){

	console.log("disconnect");

}).on("attach", function(connection, device){

	console.log("attach");

	// connection is a `node-hid.HID` instance
	connection.on("data", function(data){
		console.log("data", data);
	});
	
}).on("detach", function(connection, device){
	console.log("detach");
});

Keywords

hid

FAQs

Package last updated on 22 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts