Walker News

Modify TV Remote Control Keymap Of OpenELEC-Kodi On Raspberry Pi

Can I use TV remote control to take screenshot of OpenELEC-Kodi running on Raspberry Pi? Well, if your Raspberry Pi is connecting to a TV with HDMI-CEC feature, then you can use that TV remote control to interact with OpenELEC-Kodi media center.

For example, without any tweaking, the OpenELEC-Kodi understands my Sony Bravia TV remote control instruction as I press on these buttons – play, stop, arrow (navigation), enter (selection), fast-forward/backward, next item, etc.
If without HDMI-CEC, then I’ll have to source an infrared remote control (where the remote control talks with an USB-infrared receiver on Raspberry Pi) and deal with LIRC.

For function that I cannot find corresponding button to press, or not so easy to trigger (e.g. taking screenshot), Kodi allows me to customize the remote control keymap so that some unneeded buttons can trigger specific functions of the media center.

Sony remote control hotkey for activate XBMC context menu.

1. Using OpenELEC v6.0.3 for Raspberry Pi.

2. Connecting Raspberry Pi to network and CEC-enabled TV. You may need to consult your TV user manual for how to enable CEC feature.

3. Find out Raspberry Pi IP address from:
System > System Info > Summary

4. Turn on Samba server or ignore this if you want to access OpenELEC via SSH protocol.
System > OpenELEC >  Services

How to do it? If you access to OpenELEC Samba shares (i.e. \\Raspberry_Pi_IP_address), go to Userdata\Keymaps and create/edit the remote.xml file (NOTE: file name is case-sensitive, as OpenELEC is a Linux system!).
If you access to OpenELEC SSH server, then change directory to this path:

What is in remote.xml file? This is user-defined key mapping that change system default mapping defined in /usr/share/kodi/system/keymaps directory.

User-defined key mapping for TV remote control to interact with Kodi running on Raspberry Pi

For example, the following is in my remote.xml to allow me

1. Take screenshot with blue button,
2. Bring up context menu with red button,
3. Instantly open Music Playlists window with green button,
4. Bring up Favourites screen with yellow button

After making change to remote.xml, save it and reboot system (in order to reload new mapping)!

For reference of remote.xml structure as well as a list of Functions (e.g. ActivateWindow) and Actions (e.g. ContextMenu), please go to Kodi Keymap guide and the default remote.xml in system directory.

Custom Search

  1. wanderson 28-02-17@05:55

    This help me a lot! Thanks.

2018  •  Privacy Policy