Setting remote buttons to the actions you want
If you are using your TV remote to control the SHIELD using CEC, then you might run into issues where remote buttons are not doing what they are supposed to. For example, with my Sony Bravia TV remote, the “i+” button does not do anything by default, and I would like it to show info about what is currently being played when I press it.
In this section I will show how to manually assign remote buttons to actions in SPMC. I will use the keycodes from my remote control (SONY RM-ED060) in the examples. If you have a different remote, then you will need to find the specific keycodes for that remote. I will show you how in the video.
Install Keymap Editor and get key codes
A simple way to get the key codes for the remote buttons you want to configure is to install the addon “Keymap Editor” in SPMC. This addon lets you define what actions you want a specific remote button to do. It also shows the keycode of the button you assigned to the action, and we will use this to get the keycodes.
In the video I demonstrate how to get the keycode for the “i+” button. I make sure to discard the changes I did in Keymap Editor, because I want to edit the configuration manually in a text editor instead of using Keymap Editor:
Using this method to get the key code for each remote button that I want to configure. The table below lists these key codes and the action I want to happen when I press the button:
Button | Code | Action |
Guide | 61664 | Switch to full screen mode media being played |
Options | 61665 | Show context menu |
i+ | 61666 | Show info |
1 | 61489 | Start slideshow 1 |
2 | 61490 | Start slideshow 2 |
3 | 61491 | Start slideshow |
On my pc I create an xml file called “gen.xml” with the following contents:
<keymap> <global> <keyboard> <key id="61665">contextmenu</key> <key id="61664">fullscreen</key> <key id="61666">info</key> <key id="61489">slideshow(nfs://nas/volume1/slideshow1,random)</key> <key id="61490">slideshow(nfs://nas/volume1/slideshow2,random)</key> <key id="61491">slideshow(nfs://nas/volume1/slideshow3,random)</key> </keyboard> </global> <slideshow> <keyboard> <key id="61489">slideshow(nfs://nas/volume1/slideshow1,random)</key> <key id="61490">slideshow(nfs://nas/volume1/slideshow2,random)</key> <key id="61491">slideshow(nfs://nas/volume1/slideshow3,random)</key> </keyboard> </slideshow> </keymap>
Notice that I define the slideshow buttons both in a “Global” and “Slideshow” section. Each media section (video, music, live-tv) of SPMC can have its own set of actions defined for remote buttons. If no action is defined for a button in that section, then it will default to the “Global” action for that button.
When viewing a slideshow the numeric buttons on the remote normally zooms into a section of the image being showed. To override this default functionality I have to define the action for the slideshow buttons both in the “Global” and the “Slideshow” section or I won’t be able to switch to a different slideshow when one is already running.
After you have made your own “gen.xml” file you need to upload it to your SPMC profile on the SHIELD:
/Android/data/com.semperpax.spmc16/files/.spmc/userdata/keymaps
Use the method you set up in the “Basics” section to transfer the file from your PC to the correct folder on the SHIELD:
Then restart SPMC and your new remote button actions will be active.