Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

infinitton-idisplay

Package Overview
Dependencies
Maintainers
0
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

infinitton-idisplay

An npm module for interfacing with the Infinitton buttons

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
341
increased by23.1%
Maintainers
0
Weekly downloads
 
Created
Source

infinitton-idisplay

infinitton-idisplay is a Node.js library for interfacing with the Infinitton.

❗ Please note that infinitton-idisplay is NOT a standalone application. Instead, infinitton-idevice is a code library, which developers can use to make their own applications which interface with the Infinitton.

References

This library is a modified version of elgato-stream-deck that does not have dependencies to image libraries, and that talks to the Infinitton device instead of the Elgato Stream Deck.

Install

$ npm install --save infinitton-idisplay

Example

const Infinitton = require('infinitton-idisplay');

// Automatically discovers connected Infinittons, and attaches to the first one.
// Throws if there are no connected Infinitton devices.
// You also have the option of providing the devicePath yourself as the first argument to the constructor.
// For example: const infinitton = new Infinitton('\\\\?\\hid#vid_ffff&pid_1f40&mi_00#7&56cf813&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}')
// Device paths can be obtained via node-hid: https://github.com/node-hid/node-hid
const myInfinitton = new Infinitton();

myInfinitton.on('down', keyIndex => {
	console.log('key %d down', keyIndex);
});

myInfinitton.on('up', keyIndex => {
	console.log('key %d up', keyIndex);
});

// Fired whenever an error is detected by the `node-hid` library.
// Always add a listener for this event! If you don't, errors will be silently dropped.
myInfinitton.on('error', error => {
	console.error(error);
});

// Fill the first button form the left in the first row with a solid red color. This is synchronous.
myInfinitton.fillColor(4, 255, 0, 0);
console.log('Successfully wrote a red square to key 4.');

Keywords

FAQs

Package last updated on 02 Jul 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc