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

  Thread Rating:
  • 4 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
zeltak Offline
Senior Member
Posts: 119
Joined: Oct 2008
Reputation: 0
Thumbs Up  [LINUX] HOW-TO edit or change and make sense of LIRC keymap for XBMC, a guide Post: #1
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#U...al_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
find quote
topfs2 Online
Team-XBMC Developer
Posts: 3,825
Joined: Dec 2007
Reputation: 8
Post: #2
Thx for the guide!
This thread is also interesting, and this post aswell

Cheers,
Tobias

If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
find quote
cernst Offline
Junior Member
Posts: 2
Joined: Feb 2009
Reputation: 0
Post: #3
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>
find quote
Temar Offline
Senior Member
Posts: 259
Joined: Nov 2008
Reputation: 8
Post: #4
I wrote a more detailed description here: http://forum.xbmc.org/showthread.php?tid=45972
find quote
1455 Offline
Junior Member
Posts: 8
Joined: Mar 2009
Reputation: 0
Post: #5
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...ght=numpad
(This post was last modified: 2009-04-04 21:17 by 1455.)
find quote
slacker666 Offline
Member
Posts: 82
Joined: Oct 2008
Reputation: 0
Post: #6
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
find quote
AllanMar Offline
Member
Posts: 75
Joined: Mar 2009
Reputation: 0
Post: #7
Perhaps paste what youve used for your Keymap.xml? (Remember, its cap-sensitive) and also a debug log? (use a paste site)
find quote
FishOil Offline
Posting Freak
Posts: 836
Joined: May 2009
Reputation: 8
Post: #8
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
(This post was last modified: 2011-04-26 09:57 by FishOil.)
find quote
TheLastV8 Offline
Junior Member
Posts: 3
Joined: Jun 2009
Reputation: 0
Post: #9
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
find quote
nugentgl Offline
Member+
Posts: 194
Joined: Nov 2008
Reputation: 0
Post: #10
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?
find quote
Post Reply