Skip to content

rinie/hidstream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

HIDSTREAM

Streaming HID Events in Node.js


Example:

var hid = require('hidstream');
var dev = new hid.device('0001:001:00');

dev.on("data", function(dat) {

	console.log(dat); // easily consumed data format!
});

Sample HID Data Events:

The user has pressed Ctrl + Alt + Del

{
	modKeys : [
		, 'ctrl'
		, 'alt'
	]
	, keyCodes : [
		76
	]
	, keyChars : []
	, errorStatus : false
}

The user has pressed w, a, s & d (simultaneously (why? I don't know))

{ 
	modKeys: [] // none pressed
  	, keyCodes: [ 
  		26, 4, 22, 7 
  	]
  	, charCodes: [ 
  		'w', 'a', 's', 'd' 
  	]
  	, errorStatus: false 
}

Status

Right now, hidstream is only parsing keyboard events, and has no awareness of HID feature reports. After keyboard events are being parsed properly (and fully), I will add support for feature reports and other devices such as mice.

About

Streaming HID events in Node.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors