Archive:Apple remote

From Official Kodi Wiki
Revision as of 19:03, 13 September 2012 by Ned Scott (talk | contribs)
Jump to navigation Jump to search
Cleanup.png This page or section may require cleanup, updating, spellchecking, reformatting and/or updated images. Please improve this page if you can. The discussion page may contain suggestions.



Mac OS X and Apple TV 1 controls

Global:

  • Plus - Up
  • Minus - Down
  • Previous / Rewind - Left
  • Next / Forward - Right
  • Play / Pause - Select
  • Menu - Previous Menu
  • Hold Play - Full Screen
  • Hold Menu - Contextual menu

Home:

  • Menu - Favourites
  • Hold Menu - Shutdown Menu

Browsing videos/Library:

  • Hold Up/Down - Scroll list
  • Hold Play - Movie Information
  • Hold Menu - Contextual menu

Full Screen Video:

  • Left - Step back
  • Right - Step forward
  • Up - Volume Up
  • Down - Volume Down
  • Hold Left/Right - RW/FF
  • Menu - Stop
  • Hold Play - OSD

Music Playlist:

  • Hold Left - Move Item Up
  • Hold Right - Move Item Down
  • Hold Menu - Delete Item
  • Hold Pay - Visualisation

Screen/GUI Calibration:

  • Play - Next Calibration

Apple Remote Button Translations (for use in keymap.xml):

  • 1 Up
  • 2 Down
  • 3 Left
  • 4 Right
  • 5 Play
  • 6 Menu
  • 7 Hold Play
  • 8 Hold Menu
  • 9 Hold Left
  • 10 Hold Right
  • 11 Hold Left
  • 12 Hold Right

Buttons IDs only available on ATV (>2.3) through "Learned Remote" feature

  • 70 Play
  • 71 Pause
  • 72 Stop
  • 73 SkipPrevious
  • 74 SkipNext
  • 75 Rewind
  • 76 Forward
  • 77 Return
  • 78 Enter

Extract from keymap.xml:

<joystick name="AppleRemote">
        <button id="1">Up</button>
        <button id="2">Down</button>
        <button id="3">Left</button>
        <button id="4">Right</button>
        <button id="5">Select</button>
        <button id="6">PreviousMenu</button>
        <button id="7">Fullscreen</button>
        <button id="8">ContextMenu</button>
  
  <!-- old buttons for ATV <2.2, used on OSX  -->
        <button id="9">Left</button>
        <button id="10">Right</button>
  
  <!-- Buttons IDs that are added with the "Learned Remote" feature on ATV >2.3 -->
        <button id="70">Play</button>
        <button id="71">Pause</button>
        <button id="72">Stop</button>
        <button id="73">SkipPrevious</button>
        <button id="74">SkipNext</button>
        <button id="75">Rewind</button>
        <button id="76">FastForward</button>
        <button id="77">OSD</button>
        <button id="78">ShowVideoMenu</button>
</joystick>

For details make sure to check the keymapping file in GIT

Apple TV 2 controls

See also: Alternative Joystick.AppleRemote.xml for ATV2
Incomplete.png INCOMPLETE:
This page or section is incomplete. Please add information or correct uncertain data which is marked with a ?

(Arch)Linux

This is how to install the Apple Remote (A1294) on a Macbook under Archlinux. The IR driver is called macmini if using a different IR device find out the driver name and replace macmini. You will need to run the irrecord step below and won't be able to use the config I posted.

Install lirc using your packagemanager:

pacman -S lirc

edit /etc/conf.d/lircd.conf NOTE: the DEVICE name can differ.

 #
 # Parameters for lirc daemon
 # 

 LIRC_DEVICE="/dev/usb/hiddev1"
 LIRC_DRIVER="macmini"
 LIRC_EXTRAOPTS=""
 LIRC_CONFIGFILE="/etc/lirc/lircd.conf"

create /etc/lirc/lircd.conf

 begin remote
   name  Apple_A1294_macmini
   bits            8   
   eps            30  
   aeps          100 
   one             0     0   
   zero            0     0   
   pre_data_bits   24  
   pre_data       0x87EE86
   gap          111946
   toggle_bit_mask 0x0 
      begin codes
          KEY_MENU                 0x03
          KEY_PLAY                 0x5F 0x05
          KEY_OK                   0x5C 0x05
          KEY_RIGHT                0x06
          KEY_LEFT                 0x09
          KEY_UP                   0x0A
          KEY_DOWN                 0x0C
      end codes
 end remote

If you don't have an Apple Remote A1294 (look under the battery for the model number) you must create a file with

sudo irrecord -d /dev/usb/hiddev1 -H macmini /etc/lirc/lircd.conf

OR take a look in /usr/share/lirc/remotes/apple/ OR http://lirc.sourceforge.net/remotes/apple/ if someone else already has.

start the lirc service

sudo /etc/rc.d/lircd start

You can use the irw command to test if you have done everything right up until now. It will display button presses of the remote.

Now to xbmc:

Create ~/.xbmc/userdata/Lircmap.xml

 <lircmap>
        <remote device="Apple_A1294_macmini">
                <up>KEY_UP</up>
                <down>KEY_DOWN</down>
                <left>KEY_LEFT</left>
                <right>KEY_RIGHT</right>
                <play>KEY_PLAY</play>
                <menu>KEY_MENU</menu>
                <select>KEY_OK</select>
        </remote>
 </lircmap>