There’s a kodi addon for button configuration which should let you assign the buttons given they are recognized in the first place: http://kodi.wiki/view/Add-on:Keymap_Editor
It’s pretty self-explanatory.
If the addon doesn’t work there’s also a manual way:
First of all determine which buttons are recognized:
In kodi go to Settings → System → Logging and turn on Enable debug logging.
Then ssh to your vero2 and type in tail -f ~/.kodi/temp/kodi.log |grep OnKey:
Now press the buttons on your remote that aren’t working yet.
If a message shows up in the console you know they are recognized.
Something like this: 1855: 09:11:33 T:1972789248 DEBUG: OnKey: 229 (e5) pressed, action is ContextMenu
It’s also possible you get a name after OnKey: like “guide” or “back”
After that create a remote.xml file: nano ~/.kodi/userdata/keymaps/remote.xml
The file hast to look like this:
<remote>
<guide>Play</guide>
</remote>
In the example I assume the name you get after OnKey:… is “guide”.
And between … you type the desired kodi command/action that should be carried out. In the example its Play.
Here are some commands that can be assigned: http://kodi.wiki/view/Action_IDs
If you are done, press Ctrl + X and y to save the file.
After that restart kodi with systemctl restart mediacenter and you should be able to use the buttons.
I appreciate you taking the time to answer, but I’m pretty sure this is a CEC issue, not a keymap issue.
For example, if I enable debugging and push those three buttons on the remote, then nothing appears in the Kodi log as those buttons aren’t even passed from the TV to the Vero box. In fact, they are controlling the TV directly (opening the TV guide and changing the TV channels.)
Similarly, the Keymap Editor just times out, as it isn’t seeing the button presses either.
In both cases, I rebooted then pushed “Guide” then “P-” then “P+” then kept using only the TV remote to upload the logs.
On the Pi 2, the “Guide” button did nothing, and the “P-” and “P+” buttons navigated around the Kodi UI.
On the Vero 2, the “Guide” button interacted with the Television UI, and the “P-” and “P+” buttons changed my TV source (so I also had to switch back to the HDMI source).
The television is a Samsung UE48H6400 (with latest software updates.)
Okay, I will look at this. That TV in particular is a little problematic (some GH issues regarding it on the Pulse Eight issue tracker), but if it works on Pi, it should work on the V2.
It’s probably how Kodi is defined by the TV, recorder vs player or whatever the modes are. Is there a way on the TV in Cec settings to change what Kodi is?
Interesting. Vero 2 is configured as a Player by the bootloader but it behaves as a Recorder on Pi. You can try editing this file and see if it fixes things:
Double check the peripherals file. Did you stop Kodi first (see Wiki)? Otherwise when you reboot the file will be rewritten by Kodi and your changes will be overwritten
I have the same problem like androb. (Samsung TV, UE B series) I followed Sam´s advices without success.
I found a file cec_0000_0000.xml in .kodi/userdata/peripheral_data. This file has the same CEC related keys. After stopping Kodi, I change the key device_type to 1. After starting Kodi , the remote keys Guide, Prg … are working again.
Thanks for sharing this information @lichtus. It is hard to verify this as I don’t have a TV with problematic keys here. I suspect you will need to change the peripherals.xml and the XML file under peripheral_data for this to work properly.
Thank you, @lichtus, that was the fix for me as well.
I reverted the change under /usr/share, powered off the TV for a while, rebooted the vero, and had the TV scan for CEC devices. The Guide and P+/- buttons continue to work, so it appears that only the file under .kodi needs to be changed. Probably. Maybe.
Hi, I tried this, but the guide and context-menu buttons on my TV remote don’t work.
They were ok with Pi.
Also the key-presses don’t appear in debug mode, when I tail -f the kodi.log
I have Samsung TV. It’s not a Smart TV, but it’s HD LED (about 10 years old).
Will check if I need firmware update in TV, and I’ll revert.