[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: 122
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 Offline
Team-Kodi Developer
Posts: 4,050
Joined: Dec 2007
Reputation: 10
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: 264
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: 85
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: 994
Joined: May 2009
Reputation: 14
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
Donor
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
nugentgl Offline
Donor
Posts: 194
Joined: Nov 2008
Reputation: 0
Post: #11
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.
find quote
TREX6662k5 Offline
Donor
Posts: 214
Joined: Oct 2006
Reputation: 0
Location: London, United Kingdom
Post: #12
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?

WYSIWYG
(This post was last modified: 2009-07-17 12:32 by TREX6662k5.)
find quote
nugentgl Offline
Donor
Posts: 194
Joined: Nov 2008
Reputation: 0
Post: #13
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.
find quote
TREX6662k5 Offline
Donor
Posts: 214
Joined: Oct 2006
Reputation: 0
Location: London, United Kingdom
Post: #14
I found it in /usr/share/xbmc/system. Copied it to ~/.xbmc and edited it. It may have lingered from a previous install.

WYSIWYG
(This post was last modified: 2009-07-18 13:45 by TREX6662k5.)
find quote
Rob Xbox User Offline
Member
Posts: 91
Joined: May 2007
Reputation: 0
Post: #15
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
find quote
Post Reply