{"maintainers":[{"name":"anonymous","email":"agirorn@gmail.com"}],"keywords":["HID","USB","barcode","device","human","input","keyboard","stream"],"dist-tags":{"latest":"1.1.0"},"author":{"name":"Emily Rose","email":"emily@contactvibe.com"},"description":"Stream data from HID device in Node.js","readme":"[![npm version](https://badge.fury.io/js/node-hid-stream.svg)](https://badge.fury.io/js/node-hid-stream)\n[![Build Status](https://travis-ci.org/agirorn/node-hid-stream.svg?branch=master)](https://travis-ci.org/agirorn/nnode-hid-stream)\n\n# NODE HID STREAM\nStream data from HID device in Node.js\n\n\nWraps [node-hid](https://github.com/node-hid/node-hid) in a node.js Stream.\n\nHID devices, specifically, keyboard-like devices.\n\nAvailable Streams are:\n\n  * **Hidstream**: Stream data from `node-hid`.\n  * **Keyboard**: Stream for keyboard-like devices.\n  * **KeyboardCharacters**: for keyboard-like devices that streams characters.\n  * **KeyboardLines**: for keyboard-like devices stream lines split on ENTER. Can be used to read from  barcode scanners.\n\n**keyboard-like = (keyboards or barcode scanners)**\n----------\n## Installation\n\nYou have to make sure you can install [node-hid](https://github.com/node-hid/node-hid) before you install this module.\n\n```shell\nnpm install node-hid-stream\n```\n\n## Usage\n\n### Hidstream\n\n```javascript\nvar Hidstream = require('node-hid-stream').Hidstream;\nvar hidstream = new Hidstream({ vendorId: 3233, productId: 3233 });\n\nhidstream.on(\"data\", function(data) {\n  console.log(data); // Raw buffer from HDI device.\n});\n```\n\n### KeyboardLines\n```javascript\nvar KeyboardLines = require('node-hid-stream').KeyboardLines;\nvar lines = new KeyboardLines({ vendorId: 3233, productId: 3233 });\n\nlines.on(\"data\", function(data) {\n  // The user has pressed w, a, s & d, ENTER (simultaneously (why? I don't know))\n  console.log(data); //  \"wasd\"\n});\n```\n\n### KeyboardCharacters\n```javascript\nvar KeyboardCharacters = require('node-hid-stream').KeyboardCharacters;\nvar characters = new KeyboardCharacters({ vendorId: 3233, productId: 3233 });\n\ncharacters.on(\"data\", function(data) {\n  // The user has pressed w, a, s & d (simultaneously (why? I don't know))\n  console.log(data); //  \"wasd\"\n});\n```\n\n### Keyboard\n\n```javascript\nvar Keyboard = require('node-hid-stream').Keyboard;\nvar keyboard = new Keyboard({ vendorId: 3233, productId: 3233 });\n\nkeyboard.on(\"data\", function(data) {\n  console.log(data); // easily consumed data format!\n});\n```\n\n**Sample Data Event from Keyboard stream:**\n\nThe user has pressed Ctrl + Alt + Del\n```javascript\n{  // HidKeyboardPacket\n  modifiers: {\n    leftShift: false,\n    leftControl: true,\n    leftAlt: true,\n    leftMeta: false,\n    rightCtrl: false,\n    rightShift: false,\n    rightAlt: false,\n    rightMeta: false\n  },\n  keyCodes: [ 76 ],\n  keyChars: [],\n  errorStatus: false\n}\n```\n\nThe user has pressed w, a, s & d (simultaneously (why? I don't know))\n```javascript\n{  // HidKeyboardPacket\n  modifiers: {\n    leftShift: false,\n    leftControl: false,\n    leftAlt: false,\n    leftMeta: false,\n    rightCtrl: false,\n    rightShift: false,\n    rightAlt: false,\n    rightMeta: false\n  },\n  keyCodes: [ 26, 4, 22, 7 ],\n  charCodes: [ 'w', 'a', 's', 'd' ],\n  errorStatus: false\n}\n```\n\n### HidKeyboardPacket\n\nHidKeyboardPacket has additional convenience methods\n\n* **shift()** returns `true` if left or right shift key is pressed.\n* **control()** returns `true` if left or right control key is pressed.\n* **alt()** returns `true` if left or right alt key is pressed.\n* **meta()** returns `true` if left or right meta key is pressed.\n* **mod()** returns `true` returns true if any of the modifier keys is pressed.\n* **empty()** returns true if no key or modifier is pressed.\n\n## Contributions\n\nThis is based on [hidstream](https://github.com/emilyrose/hidstream) from [Emily Rose](https://github.com/emilyrose)\n\nSignificant refactor contributed by [@kubat](http://github.com/kubat)\n","repository":{"type":"git","url":"https://github.com/agirorn/node-hid-stream.git"},"users":{"ahvonenj":true},"license":"MIT","versions":{"0.0.1":{"name":"node-hid-stream","version":"0.0.1","description":"Stream data from HID device in Node.js","main":"lib/node-hid-stream.js","engines":{"npm":">=3","node":">=4"},"scripts":{"coverage":"istanbul cover jasmine && istanbul check-cover","dev":"nodemon --exec 'clear && npm run test --silent && clear && npm run eslint --silent'","eslint":"eslint spec examples","test":"jasmine"},"dependencies":{"node-hid":"^0.5.1","split":"^1.0.0","through":"^2.3.8"},"devDependencies":{"eslint":"^3.7.1","eslint-config-airbnb-base":"^8.0.0","eslint-plugin-import":"^2.0.1","istanbul":"^0.4.5","jasmine":"^2.5.2","nodemon":"^1.11.0","proxyquire":"^1.7.10","underscore":"^1.8.3"},"repository":{"type":"git","url":"git+https://github.com/agirorn/node-hid-stream.git"},"keywords":["HID","USB","barcode","device","human","input","keyboard","stream"],"author":{"name":"Emily Rose","email":"emily@contactvibe.com"},"license":"MIT","contributors":[{"name":"Rony Kubat","email":"rony@kubat.org"},{"name":"Ægir Örn Símonarson","email":"agirorn@gmail.com"}],"gitHead":"8e0506c4aca00212223e658af56b7ee973395620","bugs":{"url":"https://github.com/agirorn/node-hid-stream/issues"},"homepage":"https://github.com/agirorn/node-hid-stream#readme","_id":"node-hid-stream@0.0.1","_shasum":"96233dcb84cc66061798720638c6dd4161b9edb9","_from":".","_npmVersion":"3.10.8","_nodeVersion":"4.5.0","_npmUser":{"name":"anonymous","email":"agirorn@gmail.com"},"dist":{"shasum":"96233dcb84cc66061798720638c6dd4161b9edb9","tarball":"http://repository.ncinga.com/nexus/content/groups/npm-all/node-hid-stream/-/node-hid-stream-0.0.1.tgz","integrity":"sha512-1fwl5S4lN3vO/VHqnSpTs6dn7iaiLAemzJYv88q8OYPHtkkfYSzc8vCQCmSwScvLgw6GY6c37bL1Oj6Mr2ZIgg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDR7LEds785DQ3/pNgeFdh/9Z4MC2t+jru07s/Im6xpQwIgDFh2tmGXi0lUiJsGO3Y2ozLXe4OysuBEvK8b/8YFQ/o="}]},"maintainers":[{"name":"anonymous","email":"agirorn@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/node-hid-stream-0.0.1.tgz_1476807149968_0.849766013212502"},"directories":{}},"0.0.2":{"name":"node-hid-stream","version":"0.0.2","description":"Stream data from HID device in Node.js","main":"lib/node-hid-stream.js","engines":{"npm":">=3","node":">=4"},"scripts":{"coverage":"istanbul cover jasmine && istanbul check-cover","dev":"nodemon --exec 'clear && npm run test --silent && clear && npm run eslint --silent'","eslint":"eslint spec examples","test":"jasmine"},"dependencies":{"node-hid":"^0.5.1","split":"^1.0.0"},"devDependencies":{"eslint":"^3.7.1","eslint-config-airbnb-base":"^8.0.0","eslint-plugin-import":"^2.0.1","istanbul":"^0.4.5","jasmine":"^2.5.2","nodemon":"^1.11.0","proxyquire":"^1.7.10","underscore":"^1.8.3"},"repository":{"type":"git","url":"git+https://github.com/agirorn/node-hid-stream.git"},"keywords":["HID","USB","barcode","device","human","input","keyboard","stream"],"author":{"name":"Emily Rose","email":"emily@contactvibe.com"},"license":"MIT","contributors":[{"name":"Rony Kubat","email":"rony@kubat.org"},{"name":"Ægir Örn Símonarson","email":"agirorn@gmail.com"}],"gitHead":"ae1128786addd6f5118257300fec4dbd96dfe852","bugs":{"url":"https://github.com/agirorn/node-hid-stream/issues"},"homepage":"https://github.com/agirorn/node-hid-stream#readme","_id":"node-hid-stream@0.0.2","_shasum":"1c7772d12c219de5d3421ebf2dbc90bd165dd7b7","_from":".","_npmVersion":"3.10.8","_nodeVersion":"4.5.0","_npmUser":{"name":"anonymous","email":"agirorn@gmail.com"},"dist":{"shasum":"1c7772d12c219de5d3421ebf2dbc90bd165dd7b7","tarball":"http://repository.ncinga.com/nexus/content/groups/npm-all/node-hid-stream/-/node-hid-stream-0.0.2.tgz","integrity":"sha512-5nQqgtx48z0qHyc+eZJkThg0lmzK/Gfb18OKs1ZS56O4JQyWC2UKWbmOolx++OZ72ZeFTtguu13gr3VVCUrc6Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC8XDOSoss9XyULgGKPdpcMOPMCLxtRzmd6f14jNJkaOAIhAM/q9xVc6s5G1jq4xFYUIWKR2gRiYwdlMtVGTr9r5E4v"}]},"maintainers":[{"name":"anonymous","email":"agirorn@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/node-hid-stream-0.0.2.tgz_1476879846830_0.33684859215281904"},"directories":{}},"0.0.3":{"name":"node-hid-stream","version":"0.0.3","description":"Stream data from HID device in Node.js","main":"lib/node-hid-stream.js","engines":{"npm":">=3","node":">=4"},"scripts":{"ci":"npm run coverage && npm run lint","coverage":"istanbul cover jasmine && istanbul check-cover","dev":"nodemon --exec 'clear && npm run test --silent && clear && npm run lint --silent'","lint":"eslint spec examples","test":"jasmine"},"dependencies":{"node-hid":"^0.5.1","split":"^1.0.0"},"devDependencies":{"eslint":"^3.7.1","eslint-config-airbnb-base":"^8.0.0","eslint-plugin-import":"^2.0.1","istanbul":"^0.4.5","jasmine":"^2.5.2","nodemon":"^1.11.0","mockery":"^2.0.0","proxyquire":"^1.7.10","underscore":"^1.8.3"},"repository":{"type":"git","url":"git+https://github.com/agirorn/node-hid-stream.git"},"keywords":["HID","USB","barcode","device","human","input","keyboard","stream"],"author":{"name":"Emily Rose","email":"emily@contactvibe.com"},"license":"MIT","contributors":[{"name":"Rony Kubat","email":"rony@kubat.org"},{"name":"Ægir Örn Símonarson","email":"agirorn@gmail.com"}],"gitHead":"7f5b8926bd5ddc68e8d27e63688bf60b698172bd","bugs":{"url":"https://github.com/agirorn/node-hid-stream/issues"},"homepage":"https://github.com/agirorn/node-hid-stream#readme","_id":"node-hid-stream@0.0.3","_shasum":"f28d1bbabed236aa3e59a9a6a4b0f699170a3270","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.3","_npmUser":{"name":"anonymous","email":"agirorn@gmail.com"},"dist":{"shasum":"f28d1bbabed236aa3e59a9a6a4b0f699170a3270","tarball":"http://repository.ncinga.com/nexus/content/groups/npm-all/node-hid-stream/-/node-hid-stream-0.0.3.tgz","integrity":"sha512-JIU4CnbvztKY/lNRvBZ5rgCBOiCnH5eb5ME7ek00+iY+/UbmRtuzhQiyUcLW2+315NDS/gSqyYf7S06IZOpR3Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBzLOOiQ1DNTTAYHknzHblaz0gO1dRjxxRnBrmTMLs/HAiBKE6QzCp0NXmZ15bSoivw2gv0aFVeUZtLf6x8ht204Hg=="}]},"maintainers":[{"name":"anonymous","email":"agirorn@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-hid-stream-0.0.3.tgz_1506550450438_0.0015202288050204515"},"directories":{}},"1.0.0":{"name":"node-hid-stream","version":"1.0.0","description":"Stream data from HID device in Node.js","main":"lib/node-hid-stream.js","engines":{"npm":">=3","node":">=4"},"scripts":{"ci":"npm run coverage && npm run lint","coverage":"istanbul cover jasmine && istanbul check-cover","dev":"nodemon --exec 'clear && npm run test --silent && clear && npm run lint --silent'","lint":"eslint spec examples","test":"jasmine"},"dependencies":{"node-hid":"^0.5.1","split":"^1.0.0","underscore":"^1.8.3"},"devDependencies":{"eslint":"^3.7.1","eslint-config-airbnb-base":"^8.0.0","eslint-plugin-import":"^2.0.1","istanbul":"^0.4.5","jasmine":"^2.5.2","nodemon":"^1.11.0","mockery":"^2.0.0","proxyquire":"^1.7.10"},"repository":{"type":"git","url":"git+https://github.com/agirorn/node-hid-stream.git"},"keywords":["HID","USB","barcode","device","human","input","keyboard","stream"],"author":{"name":"Emily Rose","email":"emily@contactvibe.com"},"license":"MIT","contributors":[{"name":"Rony Kubat","email":"rony@kubat.org"},{"name":"Ægir Örn Símonarson","email":"agirorn@gmail.com"}],"gitHead":"3cbb1e0f85fc920f83618cd6c929d811df9b230c","bugs":{"url":"https://github.com/agirorn/node-hid-stream/issues"},"homepage":"https://github.com/agirorn/node-hid-stream#readme","_id":"node-hid-stream@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"anonymous","email":"agirorn@gmail.com"},"dist":{"integrity":"sha512-LKhQKnxdoJmKDLdj3j1ZOgul3FCi2NgMc0FZ3PtZl1hLcQmlBcn03+0hBxMxz87t3WQlnLosmGpPHrdZ0iPLYQ==","shasum":"10bf9cce2176f691382a05c1cdc9bc84b5947939","tarball":"http://repository.ncinga.com/nexus/content/groups/npm-all/node-hid-stream/-/node-hid-stream-1.0.0.tgz","fileCount":32,"unpackedSize":52267,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb1v6hCRA9TVsSAnZWagAADeAQAI8MU8yeX0D+C1h45dSQ\nRqVYjNG9Cwhxiuvk7SyabSaVigsYVZCqIdIkVvIHY7+a6EXbi7Gdj82KJPAf\nlcrKzE1PW0hPNkA+EUdEkStw3GJpFtvsf0nxYsIZrJXRO1XKXKcP9GFl2mkM\nWFj9EuWM3Z7tDhbUTRK5aem8MGT/gPFoEO/cBwJcmCYo3cYxknwelRyAuU+M\ncgEGhBFMBjPzE/O1WiSPDidYckViB0Q1YJJDpHPANS0nclzV4+Bz5KXlrwVG\n3YfR8TJ2Xw4dgxIx7ChKsomcCtI/ZHabdIOI5unoaJFOHauuBM8v/+kWVgXc\neFxsl3hUqzPv3l3eOxx/BQgAbLyGOkDpj5IBH9CUQn+s89HYJo8b1scX9/CR\ng5YDoUn46NjS+oKmfUlhtBVT2AfkXkG5cxTLswDZULdMovxT5HQVOeudyRzF\n5bZbAEbuL8QlLdxzgjIw8zwyIsQJsN4xf518oCfSJ98u3dlB3B1EAFKtBE2J\nlEIUwrHByYBZOThjf8lL1PxRO8ukuBHGuF32jhMb1CZbXv5skQbqeL7rPQDj\nVD8JzObJMx1NrKCkt9EeijT8Tu500N6TfdXTLCeQA871+/qmXz4uFiGV04hg\nZ2+lIm3fN6KAhqJsRJMGU6UGxlO8W8Lj7wMYkwysrHs41LOMvMBnBwNDFs89\nSeMR\r\n=0Jc/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD9s5n9bmxrylJysnSVlQQq+cKUdjx9D8SrB4NkL2eregIhAKwy+SRHXqSvXRZr33687wRRWSmerUqlZ0xoAbsYfsHt"}]},"maintainers":[{"name":"anonymous","email":"agirorn@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-hid-stream_1.0.0_1540816544298_0.5489586199520684"},"_hasShrinkwrap":false},"1.1.0":{"name":"node-hid-stream","version":"1.1.0","description":"Stream data from HID device in Node.js","main":"lib/node-hid-stream.js","engines":{"node":">=8"},"scripts":{"ci":"npm run coverage && npm run lint","coverage":"istanbul cover jasmine && istanbul check-cover","dev":"nodemon --exec 'clear && npm run test --silent && clear && npm run lint --silent'","lint":"eslint spec examples","test":"jasmine"},"dependencies":{"node-hid":"^0.7.9","split":"^1.0.0","underscore":"^1.8.3"},"devDependencies":{"eslint":"^6.2.0","eslint-config-airbnb-base":"^14.0.0","eslint-plugin-import":"^2.0.1","istanbul":"^0.4.5","jasmine":"3.4.0","mockery":"^2.0.0","nodemon":"^1.19.1","proxyquire":"2.1.3"},"repository":{"type":"git","url":"https://github.com/agirorn/node-hid-stream.git"},"keywords":["HID","USB","barcode","device","human","input","keyboard","stream"],"author":{"name":"Emily Rose","email":"emily@contactvibe.com"},"license":"MIT","contributors":[{"name":"Rony Kubat","email":"rony@kubat.org"},{"name":"Ægir Örn Símonarson","email":"agirorn@gmail.com"}],"licenseText":"Copyright (c) 2016 Emily Rose <nexxy@symphonysubconscious.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","_id":"node-hid-stream@1.1.0","dist":{"shasum":"de10536f947845bd15f68c1e75aed6cccc266da0","integrity":"sha512-2NAQ3GfOvtYBaKfdAZqfWYwbCx/yVKgcs0M42LKF+OMhXiEOHq/Ttj1f+33aJB+oYBXfCShGk8LqVp1yRiilng==","tarball":"http://repository.ncinga.com/nexus/content/groups/npm-all/node-hid-stream/-/node-hid-stream-1.1.0.tgz","fileCount":39,"unpackedSize":52221,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdWn0UCRA9TVsSAnZWagAAZAEQAIYTgjd60xi2k0qXL/bg\nOg0M34EcgtTl3WPtpueRIvVPXqYdtK0lMlsJEdL5livPeKIXnk6fH2TrpL60\nMmQLl9xwCQ4VLX9QOthXMfAAXNC8V+XlbZgswMQdPltxkOQgXl5cd2jFldGy\nLpVR5h/hTQyyPJ/7RObMxIwQqv8gF8PsoCTdKIfpv8e89sz6Vhaz7PFrPtFM\ny8CMQoALwpx97M8sUNqEscI46gQM5g4Hh0UPus1HmzBjOd907eWji+UbUthl\nv7SCC2SMKlm2B5x9tEc4++WTYt/ECvheX9gt8DBouXO5YhM5U7SkS86ghHmn\nQwzqFEDpkWMOODjb7mVn1ppIBqtyn2sUsaKWku/9uQphhaCcFI4Tynta65OS\nnIqtB+DZiBSVCg2zcZmBVqX0tkAfxfoFSC3BZ+22IB5abjF4eJ/aScm3gDGB\nrxHs0TimknRwpOyO0z7uRoaPRvUV2jNRv8fi8RgsTJreWFncpmoGWqTShauo\nwmOcaThvd6aeLgAMZMtAh71885LWLdBBrLnaRUAqSPf+pomAti8AUdL5iOnu\nWVUkqp/Rght1hVdNxy8eFX7JjbnFeSEHgqrINkvYpbOj8MN17kpipmwFbXji\n1+KT+OV4Tq0Tar6aGuL/z27WhLvrt/AJP9jV3zsbdkpQ5JnSyPu/QyodGr6Q\nTqUP\r\n=LxeU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEBBY1gO5BFYj7Gzuntz2NOlPu8naRuoNnthjd3C1MIgIhAKkFtbF5qeE/R3Ar45Oeg5GCTZqF8EYuKdk8/HSNK1Xm"}]},"maintainers":[{"name":"anonymous","email":"agirorn@gmail.com"}],"_npmUser":{"name":"anonymous","email":"agirorn@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-hid-stream_1.1.0_1566211347609_0.15222183356112495"},"_hasShrinkwrap":false}},"name":"node-hid-stream","time":{"modified":"2022-06-21T15:30:05.341Z","created":"2016-10-18T16:12:32.731Z","0.0.1":"2016-10-18T16:12:32.731Z","0.0.2":"2016-10-19T12:24:07.403Z","0.0.3":"2017-09-27T22:14:11.503Z","1.0.0":"2018-10-29T12:35:44.431Z","1.1.0":"2019-08-19T10:42:27.737Z"},"contributors":[{"name":"Rony Kubat","email":"rony@kubat.org"},{"name":"Ægir Örn Símonarson","email":"agirorn@gmail.com"}],"readmeFilename":"README.md"}