1.0.0 • Published 8 years ago

node-apple-remote v1.0.0

Weekly downloads
4
License
ISC
Repository
github
Last release
8 years ago

node-apple-remote

Simple node.js library for receiving events from an aluminum Apple Remote

Usage

NPM

var AppleRemote = require('node-apple-remote');
var remote = new AppleRemote();
try {
    remote.open()
          .on('left', /* ... */)
          .on('left.long', /* ... */)
          .on('left.long.released', /* ... */)
          .on('center', /* ... */)
          .on('center.long', /* ... */)
} catch (e) {
    // an exception is thrown if the apple remote
    //  device was not found on the system
}

All events

'raw'                  // Every single event; the Button pressed is passed.
                       // it is unlikely you will need this
'button'               // Each parsed button event; for example, 'left'
                       //  will never have a 'left.released' follow it,
                       //  though a 'raw' Released event may fire. In
                       //  most cases, it may be easiest to register
                       //  specific listeners (below)

'left'                 // single-press
'left.long'            // long-press (as in rewind); release to follow
'left.long.released'   // release of long-press 
'right' 
'right.long' 
'right.long.released' 

'up'                   // pressed; release ALWAYS follows
'up.released'          // note that there is no up.long
'down'
'down.released'

'center'               // single-press only
'center.long'          // long-press only (not "holdable")
'playpause'
'playpause.long'
'menu'
'menu.long'

'error'                // emits with the an error Object from node-hid

node-apple-remote and Electron/NW.js

If using this library with Electron or NW.js, see the notes from node-hid.

1.0.0

8 years ago

0.3.0

8 years ago

0.2.0

8 years ago

0.1.3

9 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago