PDA

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


zeltak
2008-10-18, 13:58
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 me:rofl:...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://xbmc.org/wiki/?title=Keymap.xml#Universal_Remotes)

b. modify the inside bracket to whatever xbmc command you want (see http://xbmc.org/wiki/?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, 14:47
Thx for the guide!
This thread (http://xbmc.org/forum/showthread.php?t=31083) is also interesting, and this post (http://xbmc.org/forum/showpost.php?p=167902&postcount=9) aswell

Cheers,
Tobias

cernst
2009-02-08, 02:32
I have edited the Lircmap for the MCE remote like the XBMC documentation.
Power button is disabled, shutdown is executed by irexec.

<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-28, 00:11
I wrote a more detailed description here: http://xbmc.org/forum/showthread.php?t=45972

1455
2009-04-04, 21:19
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://xbmc.org/forum/showthread.php?t=45005&highlight=numpad

slacker666
2009-05-23, 14:39
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, 17:08
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, 23:56
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-25, 00:57
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 :)

nugentgl
2009-07-15, 22:41
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, 07:00
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, 13:29
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, 17:04
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, 14:43
I found it in /usr/share/xbmc/system. Copied it to ~/.xbmc and edited it. It may have lingered from a previous install.

Rob Xbox User
2009-08-03, 22:45
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

OzKu1
2009-09-29, 21:24
When i run IRW, it shows nothing. I tried to map my remote using irrecord, but still this doesn't work, any tips? In irrecord it did recognize my buttons. According to lsusb, my remote is Bus 003 Device 002: ID 195d:7002 Itron Technology iONE Libra-Q11 IR remote.

I uset this tutorial: https://help.ubuntu.com/community/InstallLirc/Hardy#Recording%20a%20Remote

mulb
2009-10-07, 21:12
hello,

with the latest svn, my lirc remote does not work anymore.
It was working well until r22198. Now I'm using r23441.
With irw, it's still ok.
I kept Lircmap.xml in .xbmc/userdata/
I did not change it.

I have a remote.xml in /usr/local/share/xbmc/system/keymaps/

But in the xbmc.log, I have no message telling that LIRC started, like I used to have, even if I have
INFO: Loading special://profile/Lircmap.xml

What can I do?

thanks
Mulb

EowynCarter
2009-11-01, 17:18
Why do setting up remotes have to be such a pain anyway ?