Kodi Community Forum
Keymap using HDMI CEC - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
---- Thread: Keymap using HDMI CEC (/showthread.php?tid=139145)



Keymap using HDMI CEC - Wendo - 2012-08-27

Hi

I've got XBMC running happily on a raspberrypi and my remote works almost perfectly using HDMI CEC (Panasonic TV)

Anyway the fastforward and rewind buttons on the remote instead do skipnext and skipprev, jumping to the start or end of everything without chapters.

I figured this would be pretty easy to fix since I can see the key presses in xbmc.log and the keycodes they map too as below

Code:
17:22:32 T:1102704640   DEBUG: OnKey: pause (dd) pressed, action is SkipPrevious
17:22:43 T:1102704640   DEBUG: OnKey: 223 (df) pressed, action is SkipNext

So I created a remote.xml file and added pretty much every combination I could think of for this to work but nothing changes. I've confirmed the file is being read and overwrites any previous definitions by mapping the "yellow" button to OSD and that works properly.. The working file remapping yellow is below

Code:
<keymap>
  <global>
    <remote>
      <yellow>OSD</yellow>
    </remote>
  </global>
</keymap>

I've tried adding

Code:
<key id="223">FastForward</key>

I've tried changing it to

Code:
<universalremote>
  <obc221>Rewind</obc221>
  <obc223>FastForward</obc223>
</universalremote>[/code]

but none of them change the mappings of these keys. The logfile doesn't give me any errors when doing this so I assume the format is correct, just for some reason that mappings don't take.

What am I doing wrong?

Thanks


RE: Keymap using HDMI CEC - sectune - 2012-09-12

Hey Wendo, did you find a solution in the meantime?
If not: I would also like to know the answer as I am aswell an owner of a Panasonic plasma and was thinking to purchase the pulse eight cec-hdmi adapter. Could somebody provide us a solution or something to refer to? Thanks a lot Smile


RE: Keymap using HDMI CEC - Knapster - 2013-01-04

Ok this is an older thread, but i got the same problem today. (Raspbmc and Panasonic Viera)(This should work for normal XBMC and other devices, too. Only the paths differs)
Trying around the whole night, i found a solution.

I first did a new remote.xml with all possible "keys" i found in "ButtonTranslator.cpp" in the "TranslateRemoteString" function.
Most of them are in the original remote.xml, too.
So i wrote the xml with entrys like this:
Code:
<enter>Notification(Keypress, enter, 1)</enter>
To see which button has which identifier.
I copied the remote.xml in the "/opt/xbmc-bcm/xbmc-bin/share/xbmc/system/keymaps" folder and not into the normal "/home/pi/.xbmc/userdata/keymaps" to replace the standard settings. (Of course i did a backup before.)
Now pressing a button on the remote shows me the correct identifier i have to use.

Here is my "remote.xml" to test the buttons:
Code:
<keymap>
    <global>
        <remote>
            <channelplus>Notification(Keypress, channelplus, 1)</channelplus>
            <channelminus>Notification(Keypress, channelminus, 1)</channelminus>
            <xbox>Notification(Keypress, xbox, 1)</xbox>
            <star>Notification(Keypress, star, 1)</star>
            <playlist>Notification(Keypress, playlist, 1)</playlist>
            <language>Notification(Keypress, language, 1)</language>
            <teletext>Notification(Keypress, teletext, 1)</teletext>
            <subtitle>Notification(Keypress, subtitle, 1)</subtitle>
            <info>Notification(Keypress, info, 1)</info>
            <hash>Notification(Keypress, hash, 1)</hash>
            <start>Notification(Keypress, start, 1)</start>
            <clear>Notification(Keypress, clear, 1)</clear>
            <play>Notification(Keypress, play, 1)</play>
            <pause>Notification(Keypress, pause, 1)</pause>
            <stop>Notification(Keypress, stop, 1)</stop>
            <forward>Notification(Keypress, forward, 1)</forward>
            <reverse>Notification(Keypress, reverse, 1)</reverse>
            <left>Notification(Keypress, left, 1)</left>
            <right>Notification(Keypress, right, 1)</right>
            <up>Notification(Keypress, up, 1)</up>
            <down>Notification(Keypress, down, 1)</down>
            <select>Notification(Keypress, select, 1)</select>
            <enter>Notification(Keypress, enter, 1)</enter>
            <pageplus>Notification(Keypress, pageplus, 1)</pageplus>
            <pageminus>Notification(Keypress, pageminus, 1)</pageminus>
            <back>Notification(Keypress, back, 1)</back>
            <menu>Notification(Keypress, menu, 1)</menu>
            <title>Notification(Keypress, title, 1)</title>
            <info>Notification(Keypress, info, 1)</info>
            <skipplus>Notification(Keypress, skipplus, 1)</skipplus>
            <skipminus>Notification(Keypress, skipminus, 1)</skipminus>
            <display>Notification(Keypress, display, 1)</display>
            <start>Notification(Keypress, start, 1)</start>
            <record>Notification(Keypress, record, 1)</record>
            <volumeplus>Notification(Keypress, volumeplus, 1)</volumeplus>
            <volumeminus>Notification(Keypress, volumeminus, 1)</volumeminus>
            <mute>Notification(Keypress, mute, 1)</mute>
            <power>Notification(Keypress, power, 1)</power>
            <myvideo>Notification(Keypress, myvideo, 1)</myvideo>
            <mymusic>Notification(Keypress, mymusic, 1)</mymusic>
            <mypictures>Notification(Keypress, mypictures, 1)</mypictures>
            <mytv>Notification(Keypress, mytv, 1)</mytv>
            <guide>Notification(Keypress, guide, 1)</guide>
            <livetv>Notification(Keypress, livetv, 1)</livetv>
            <liveradio>Notification(Keypress, liveradio, 1)</liveradio>
            <recordedtv>Notification(Keypress, recordedtv, 1)</recordedtv>
            <epgsearch>Notification(Keypress, epgsearch, 1)</epgsearch>
            <red>Notification(Keypress, red, 1)</red>
            <green>Notification(Keypress, green, 1)</green>
            <yellow>Notification(Keypress, yellow, 1)</yellow>
            <blue>Notification(Keypress, blue, 1)</blue>
            <zero>Notification(Keypress, zero, 1)</zero>
            <one>Notification(Keypress, one, 1)</one>
            <two>Notification(Keypress, two, 1)</two>
            <three>Notification(Keypress, three, 1)</three>
            <four>Notification(Keypress, four, 1)</four>
            <five>Notification(Keypress, five, 1)</five>
            <six>Notification(Keypress, six, 1)</six>
            <seven>Notification(Keypress, seven, 1)</seven>
            <eight>Notification(Keypress, eight, 1)</eight>
            <nine>Notification(Keypress, nine, 1)</nine>
        </remote>
    </global>
</keymap>

Here on my Panasonic Viera the FastForward button is "skipplus" and the Rewind is "skipminus"


RE: Keymap using HDMI CEC - nickr - 2013-01-04

Knapster that is some damn fine hacking there Smile


RE: Keymap using HDMI CEC - reluctantflux - 2015-06-17

So I can use this to determine which CEC commands are reaching Kodi, is that correct? I'm trying to setup Kodi on my Nvidia Shield and I'm trying to figure out what buttons are reaching Kodi, so that I can remap them appropriately. In my searching, this appears to be the only option I've come across.


RE: Keymap using HDMI CEC - host505 - 2015-06-18

No it's not. Things are much easier nowadays with the keymap editor addon.


RE: Keymap using HDMI CEC - reluctantflux - 2015-06-18

Thanks! I used that last night and it worked great. I wasn't sure if HDMI-CEC was passing through an embedded IR signal, or if it was something different. Luckily, that was the case.


This forum uses Lukasz Tkacz MyBB addons.