Mapping missing context menu in OpenELEC with Remote Control HAMA MCE

img The IR remote control HAMA MCE works out of the box with XBMC. Except that XBMC’s context menu is not mapped to any key.

An alternative solution to the one provided here is using your smart phone or tablet as a remote control with the excellent Yatse app.

Setup

Problem

Remote control does not have a key which is mapped to the context menu.

For the impatient

  • Login to your Raspberry Pi with SSH
  • Create file /storage/.xbmc/userdata/Lircmap.xml.
  • Add following content:
		<lircmap>
			<remote device="devinput">
				<title>KEY_INFO</title>
			</remote>
		</lircmap>
  • Restart Raspberry Pi

Solution

File locations

  • OpenELEC’s system location for keymap related configs are located here: /usr/share/xbmc/system/ (I found this information in the openelec forum)
  • System default keymaps folder: /usr/share/xbmc/system/keymaps/
  • System default Lircmap.xml: /usr/share/xbmc/system/Lircmap.xml
  • Root user’s keymaps folder (empty by default): /storage/.xbmc/userdata/keymaps/
  • Root user’s Lircmap.xml does not exist by default. It has to be created: /storage/.xbmc/userdata/Lircmap.xml

Workflow

Get device name and name of desired button on remote control (‘irw’)

  • Adapted from Guide To Test a Remote and Remap Keys
  • Login via SSH
  • Type command irw
  • Press the button on remote control where you would like to map the context menu (I pressed the button with the ‘right mouse click’ symbol). This will output something like:
root# irw
17b 0 KEY_INFO devinput
17b 0 KEY_INFO_UP devinput

KEY_INFO is the key name, devinput is the device name.

The next sentence in the guide was not clear to me (userdata SMB share is /usr/share/xbmc/system/…):

Make sure you have a proper remote.xml in your keymaps folder which is inside your userdata SMB share (or located at /storage/.xbmc/userdata/keymaps/remote.xml)

With OpenELEC the location of userdata SMB share is /usr/share/xbmc/system/Lircmap.xml.

Get function name for context menu

The function name can be read from /usr/share/xbmc/system/Lircmap.xml. Search for ContextMenu. This should look like:

...
<title>ContextMenu</title> 
...

The function name for context menu is title.

Create customized Lircmap.xml

Create /storage/.xbmc/userdata/Lircmap.xml:

$ nano /storage/.xbmc/userdata/Lircmap.xml

and add the following content (adapt to your needs):

<lircmap>
	<remote device=”devinput”>
		<title>KEY_INFO</title>
	</remote>
</lircmap>

That’s it. Restart Raspberry Pi and the context menu should now work.

comments powered by Disqus