Archive:Apple remote: Difference between revisions
Jump to navigation
Jump to search
>Mac2k (Add Linux 2 Apple TV 2) |
>Mac2k (Added the Linux apple remote 2 stuff.) |
||
Line 107: | Line 107: | ||
===Apple TV 2 controls=== | ===Apple TV 2 controls=== | ||
==== Linux ==== | ==== Archlinux Linux ==== | ||
Install lirc using your packagemanager: | |||
pacman -S lirc | |||
edit /etc/conf.d/lircd.conf NOTE: the DEVICE name can differ. | |||
<source lang="bash"> | |||
# | |||
# Parameters for lirc daemon | |||
# | |||
LIRC_DEVICE="/dev/usb/hiddev1" | |||
LIRC_DRIVER="macmini" | |||
LIRC_EXTRAOPTS="" | |||
LIRC_CONFIGFILE="/etc/lirc/lircd.conf" | |||
</source> | |||
create /etc/lirc/lircd.conf | |||
<source lang="bash"> | |||
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 | |||
</source> | |||
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 | |||
<source lang="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> | |||
</source> | |||