# node-apple-remote

> Simple event-driven interface to Aluminum Apple Remote

Latest version **1.0.0** (published 2016-07-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install node-apple-remote
pnpm add node-apple-remote
yarn add node-apple-remote
bun add node-apple-remote
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-07-24 |
| First published | 2014-07-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13 |
| Author | Daniel Leong |
| Maintainers | dhleong |
| Keywords | apple, remote, aluminum |

## Links

- npm: https://www.npmjs.com/package/node-apple-remote
- Repository: https://github.com/dhleong/node-apple-remote
- Issues: https://github.com/dhleong/node-apple-remote/issues
- npm.io page: https://npm.io/package/node-apple-remote

## Dependencies (1)

- [node-hid](https://npm.io/package/node-hid.md) ^0.5.1

## Recent versions

- 1.0.0 (latest) — 2016-07-24
- 0.3.0 — 2016-07-08
- 0.2.0 — 2016-07-03
- 0.1.3 — 2015-07-06
- 0.1.2 — 2014-07-27
- 0.1.1 — 2014-07-12
- 0.1.0 — 2014-07-08

## README

node-apple-remote
=================

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

### Usage

[![NPM](https://nodei.co/npm/node-apple-remote.png?mini=true)][1]

```javascript
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

```javascript
'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][2] or [NW.js][3], see the 
[notes from node-hid][4].

[1]: https://nodei.co/npm/node-apple-remote/
[2]: http://electron.atom.io/
[3]: http://nwjs.io
[4]: https://github.com/node-hid/node-hid#using-node-hid-in-electron-projects

---
_Source: https://npm.io/package/node-apple-remote · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
