Command-line tool that streams button presses from Apple IR remotes on OS X.
Objective-C JavaScript Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



A command-line tool for Mac OS X that interfaces with Apple Infrared remotes and outputs all button presses. Intercepts all IR commands while running. Kill the process to stop listening.

Also includes a simple node.js based server (iremote.js) which serves the detected events on a WebSocket.

Based on VLC's AppleRemote code, licensed under the GPL.

output format

Button presses are printed as JSON objects, separated by a newline.

e.g. Pressing "play"


e.g. Holding and releasing "right" (next)


Available keys are play, up, down, left, right, menu and ok (newer remotes only). Holding play will generate a sleep button press.

websocket control

You can receive commands over a WebSocket as JSON packets. For example, to control a Deck.js slideshow:

    var host =*/, '');
    var ws = new WebSocket('ws://' + host + ':8080');
    ws.onmessage = function (event) {
      var data = JSON.parse(;
      var command = {
          up:    'prev',
          left:  'prev',
          right: 'next',
          down:  'next',
          play:  'next',

      if (command) {

Steven Wittens -