Guide to add your own remote

This guide will show you howto add your own remote using ir-keytable.

Firstly login to your OpenELEC machine via SSH and install the nano text editor

Create a ir keytable:
First you need to run this commands: killall eventlircd killall lircd ir-keytable -p NEC,RC-5,RC-6,JVC,SONY,LIRC,OTHER ir-keytable -c ir-keytable -t

You can now create a ir-keytable that fits your remote control.

The hexadecimal scancode needs to to be assigned to a function of the key. scancode = 3d will become 0x003d, scancode = 01 becomes 0x0001 etc.

start pushing buttons and create a list with all buttons you need and there corresponding function. you can have a look at /etc/rc_keymaps/rc6_mce for reference.

This is a manual job so have a notepad or whatever open an paste in the button code there and add actions like this: 0x800f0400 KEY_NUMERIC_0 0x800f0401 KEY_NUMERIC_1 0x800f0402 KEY_NUMERIC_2 0x800f0403 KEY_NUMERIC_3 0x800f0404 KEY_NUMERIC_4 0x800f0405 KEY_NUMERIC_5 0x800f0406 KEY_NUMERIC_6 0x800f0407 KEY_NUMERIC_7 0x800f0408 KEY_NUMERIC_8 0x800f0409 KEY_NUMERIC_9 0x800f040a KEY_DELETE 0x800f040b KEY_ENTER 0x800f040c KEY_POWER 0x800f040d KEY_PROG1 0x800f040e KEY_MUTE 0x800f040f KEY_INFO
 * 1) table my_remote, type: remote_type

Now save your file in the Configfiles share with some name, my_remote for example

Now run the following command from a ssh promt:

ir-keytable -c -p NEC,RC-5,RC-6,JVC,SONY,LIRC,OTHER -w /sotrage/.config/my_remote

Or create a autostart.sh script and reboot.

Create a autostart.sh script to load the map on boot
edit the autostart.sh script or add it if it doesn't exist in the Configfiles share.

or use SSH and run nano or vi on the script nano /storage/.config/autostart.sh

add the following line to it:

ir-keytable -c -p NEC,RC-5,RC-6,JVC,SONY,LIRC,OTHER -w /sotrage/.config/my_remote

Reboot and that should be it. :)

Reference
http://www.yavdr.org/documentation/0.5/en/ch03s03.html

http://openelec.tv/forum/103-infared-remotes/67150-apple-remote-with-generic-built-and-ir

http://git.linuxtv.org/v4l-utils.git/tree/HEAD:/utils/keytable/rc_keymaps more keytables