Kodi Community Forum
[LINUX] HOW-TO edit or change and make sense of LIRC keymap for XBMC, a guide - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Tips, tricks, and step by step guides (https://forum.kodi.tv/forumdisplay.php?fid=110)
+--- Thread: [LINUX] HOW-TO edit or change and make sense of LIRC keymap for XBMC, a guide (/showthread.php?tid=39183)

Pages: 1 2


[LINUX] HOW-TO edit or change and make sense of LIRC keymap for XBMC, a guide - zeltak - 2008-10-18

Hi

I am by no way an experienced user but after spending literally 2 days trying to figure this out (the documentation is either missing/hard to find/or hard to understand for non-programmers like me) i decided to share what worked for me.

Please if anyone is more experienced please go over this as it maybe full of mistakes..but it worked for meRofl...so here goes

1. the way it works is that you need to create (or better copy from /usr/share/XBMC/system the files keymap.xml and lircmap.xml to /home/USER/.xbmc/usrdata)

3.if not yet known use irw from the CLI to get the remote irw names and codes
(this assumes you installed lirc and have it runing and configured---easly done in ubuntu if you use mythbuntu or its configuration util to setup lirc):

example output:

USER@ztpc:~$ irw
00000000000017bb 00 Go Hauppauge_350
00000000000017bd 00 Power Hauppauge_350
000000000000179c 00 TV Hauppauge_350


2. edit the file lircmap.xml :

a)make sure remote name fits the one you got in irw (Hauppauge_350 in this case)
b)that the name inside brackets fits the name in the irw output ("TV" in this example<mytv>TV</mytv>)

example:

<lircmap>
<remote device="Hauppauge_350">
<pause>Pause</pause>
<stop>Stop</stop>
<forward>Forward</forward>
<reverse>Rewind</reverse>
<left>Left</left>
<right>Right</right>
<up>Up</up>
<down>Down</down>
<select>OK</select>
<pageplus>Ch+</pageplus>
<pageminus>Ch-</pageminus>
<back>Guide</back>
<menu>Radio</menu>
<title>Prev.Ch</title>
<info>Menu/i</info>
<skipplus>Skip</skipplus>
<skipminus>Replay</skipminus>
<display>Go</display>
<start>Back/Exit</start>
<record>Record</record>
<volumeplus>Vol+</volumeplus>
<volumeminus>Vol-</volumeminus>
<mute>Mute</mute>
<power>Power</power>
<myvideo>Videos</myvideo>
<mymusic>Music</mymusic>
<mypictures>Pictures</mypictures>
<mytv>TV</mytv>
<one>1</one>
<two>2</two>
<three>3</three>
<four>4</four>
<five>5</five>
<six>6</six>
<seven>7</seven>
<eight>8</eight>
<nine>9</nine>
<zero>0</zero>
<star>Asterix</star>
<hash>Blue</hash>
</remote>

3. edit the keymap.xml file:

a.look for the remote section and edit the outside brackets to fit the lircmap file (button names can be found at http://wiki.xbmc.org/?title=Keymap.xml#Universal_Remotes)

b. modify the inside bracket to whatever xbmc command you want (see http://wiki.xbmc.org/?title=Window_IDs for more info/functions)

example:

<keymap>
<global>
<remote>
<three>VolumeUp</three>
<six>VolumeDown</six>
<nine>Mute</nine>
<play>Play</play>
<pause>Pause</pause>
<stop>Stop</stop>
<forward>FastForward</forward>
<reverse>Rewind</reverse>
<left>Left</left>
<right>Right</right>
<up>Up</up>
<down>Down</down>
<select>Select</select>
<pageplus>PageUp</pageplus>
<pageminus>PageDown</pageminus>
<back>ParentDir</back>
<menu>PreviousMenu</menu>
<title>ContextMenu</title>
<info>Info</info>
<skipplus>SkipNext</skipplus>
<skipminus>SkipPrevious</skipminus>
<display>FullScreen</display>
<start>PreviousMenu</start>
<record>Screenshot</record>
<volumeplus>VolumeUp</volumeplus>
<volumeminus>VolumeDown</volumeminus>
<mute>Mute</mute>
<power>XBMC.ShutDown()</power>
<myvideo>XBMC.ActivateWindow(MyVideos)</myvideo>
<mymusic>XBMC.ActivateWindow(MyMusic)</mymusic>
<mypictures>XBMC.ActivateWindow(MyPictures)</mypictures>
<mytv>XBMC.ActivateWindow(Home)</mytv>
<star>XBMC.ActivateWindow(favourites)</star>
<hash>ActivateWindow(PlayerControls)</hash>
</remote>

Hope it help

Zeltak


- topfs2 - 2008-10-18

Thx for the guide!
This thread is also interesting, and this post aswell

Cheers,
Tobias


- cernst - 2009-02-08

I have edited the Lircmap for the MCE remote like the XBMC documentation.
Power button is disabled, shutdown is executed by irexec.

Code:
<lircmap>
    <remote device="mceusb">
        <left>Left</left>
        <right>Right</right>
        <up>Up</up>
        <down>Down</down>
        <select>OK</select>
        <back>Back</back>
        <menu>DVD</menu>
        <info>More</info>
        <!-- <display>Home</display> -->
        <title>Guide</title>
        <play>Play</play>
        <pause>Pause</pause>
        <reverse>Rewind</reverse>
        <forward>Forward</forward>
        <skipplus>Skip</skipplus>
        <skipminus>Replay</skipminus>
        <stop>Stop</stop>
        <zero>Zero</zero>
        <one>One</one>
        <two>Two</two>
        <three>Three</three>
        <four>Four</four>
        <five>Five</five>
        <six>Six</six>
        <seven>Seven</seven>
        <eight>Eight</eight>
        <nine>Nine</nine>
        <!-- <power>Power</power> -->
        <mytv>Red</mytv>
        <mymusic>Green</mymusic>
        <mypictures>Yellow</mypictures>
        <myvideo>Blue</myvideo>
        <record>Record</record>
        <start>Home</start>
        <volumeplus>VolUp</volumeplus>
        <volumeminus>VolDown</volumeminus>
        <channelplus>ChanUp</channelplus>
        <channelminus>ChanDown</channelminus>
        <pageplus>ChanUp</pageplus>
        <pageminus>ChanDown</pageminus>
        <mute>Mute</mute>
        <recordedtv>RecTV</recordedtv>
        <livetv>LiveTV</livetv>
        <star>Star</star>
        <hash>Hash</hash>
        <clear>Clear</clear>
    </remote>
</lircmap>



- Temar - 2009-03-27

I wrote a more detailed description here: http://forum.xbmc.org/showthread.php?tid=45972


- 1455 - 2009-04-04

I need to write in the Keymap.xml numpad keys up, down, left, right (on the right side of the keyboard). For example, in the xine player this is called KP_Up and so on. How should they be called?

Sorry, it seems, has found: http://forum.xbmc.org/showthread.php?tid=45005&highlight=numpad


- slacker666 - 2009-05-23

ubuntu replies to my remote (an ASUS DH Remote) when i run irw in console, but i cannot seem to get them to work, i replaced the commands with the output from irw in lircmap.xml (under ~/.xbmc/userdata) and copied the keymap.xml there (used the one here as a template), i dont know what to do? i restarted lircd too


- AllanMar - 2009-05-23

Perhaps paste what youve used for your Keymap.xml? (Remember, its cap-sensitive) and also a debug log? (use a paste site)


- FishOil - 2009-05-23

zeltak Wrote:Hi
1. the way it works is that you need to create (or better copy from /usr/share/XBMC/system the files keymap.xml and lircmap.xml to /home/USER/.xbmc/usrdata)
Zeltak

Maybe you made a typo but I am pretty sure its /home/USER/.xbmc/userdata and not /home/USER/.xbmc/usrdata


- TheLastV8 - 2009-06-24

Its very important to look after the correct "format" of the XML-Files i have had a pita of problems with copy&paste within putty windows. The Files just wouldnt work unless i edited them all with vi by hand.
I just wasted 4 hours finding this out Smile


- nugentgl - 2009-07-15

I am trying to follow this guide but my recent install of XBMC (R21650) doesn't have a Keymap.xml or keymap.xml in either /usr/share/xbmc/system or ~/.xbmc/userdata. Where is this file?

What is strange is that my MCE remote is working just fine with XBMC (meaning can navigate in XBMC, stop, pause, fast forward, etc) so there has to be a keymap.xml, right?


- nugentgl - 2009-07-17

nugentgl Wrote:I am trying to follow this guide but my recent install of XBMC (R21650) doesn't have a Keymap.xml or keymap.xml in either /usr/share/xbmc/system or ~/.xbmc/userdata. Where is this file?

What is strange is that my MCE remote is working just fine with XBMC (meaning can navigate in XBMC, stop, pause, fast forward, etc) so there has to be a keymap.xml, right?

Nevermind, with new revs of XBMC keymap.xml is no longer used. Instead it uses remote.xml in ~/.xbmc/userdata/keymaps.


- TREX6662k5 - 2009-07-17

Its Lircmap.xml too btw. Case sensitive.

"Nevermind, with new revs of XBMC keymap.xml is no longer used. Instead it uses remote.xml in ~/.xbmc/userdata/keymaps."

I'm using the latest SVN and Keymap.xml is still there. Unless its a very recent commit?


- nugentgl - 2009-07-17

Really, where did you find keymap.xml? Also, is your XBMC a fresh install? Maybe you have keymap.xml b/c you have been upgrading previous versions. The wiki now says that keymap.xml is no longer using in recent revs BUT it will still be used if it already exists for compatibility. When you look in /usr/share/xbmc/system there is no keymap.xml and there is a folder called keymaps that houses many mapping xml files. I just copied remote.xml to my userdata folder and all was good.


- TREX6662k5 - 2009-07-18

I found it in /usr/share/xbmc/system. Copied it to ~/.xbmc and edited it. It may have lingered from a previous install.


Not Clear - Rob Xbox User - 2009-08-03

Can anyone please explain this stage of his instructions:

3.if not yet known use "irw from the CLI" to get the remote irw names and codes.....

I