Add functions to buttons on remote
#1
I have been looking for an easy guide to add functions to unused buttons on my Imon remote.
What I want to do is map some functions to the following buttons on the remote:
  • Button Name: AspectRatio, Function: Change aspect ratio
  • Button Name : Caption, Function: Change subtitle language
  • Button Name: Language, Function: Change to next audiostream

I have searched on this forum and others but have not found out how to do this. What files do I edit?

Please help me out and I'd be very thankful.
Reply
#2
i just did the same thing today, i found everythings in the wiki!
XBMC SVN (updated every week) ubuntu Karmic 64bits
Intel E5200/ 3 Go Ram / Nvidia GT220 1Go / 6To (1.5To x 4 Raid 5)
Reply
#3
SwedishGojira Wrote:I have been looking for an easy guide to add functions to unused buttons on my Imon remote.

Maybe not the easiest guide, but if your remote has a lot of buttons then this is the only way to go:

http://forum.xbmc.org/showthread.php?tid=45972

If you do not already use all of the predefined XBMC button codes and only want to map one or two more buttons it might be easier to use the way described in the wiki.
Reply
#4
Could you maybe show me where to find this info in the Wiki?
An example of what you did would be nice cause I've tried following the wiki but I may be missing out on something...
Reply
#5
you tried following something you didn't find?

i call bullshit
Reply
#6
spiff Wrote:you tried following something you didn't find?

i call bullshit

call it what you want, but I can't find any section that tells me exactly how to do this.
I found this and this.

I have a button on my Imon-pad that IRW idConfused as "AspectRatio".
On this button I want the XBMC function of the same name, "AspectRatio".

I've tried adding this to my Keymap.xml :
Code:
<universalremote>
      <aspect>AspectRatio</aspect>
    </universalremote>
and this to my Lircmap.xml :
Code:
<aspect>AspectRatio</aspect>

But it didn't work so I guess I've understood it wrong...
Reply
#7
erased
XBMC SVN (updated every week) ubuntu Karmic 64bits
Intel E5200/ 3 Go Ram / Nvidia GT220 1Go / 6To (1.5To x 4 Raid 5)
Reply
#8
you need to add them under <remote>. the <universalremote> tag is only used on xbox i believed, but then remember i added a diff that allows you to use the obc codes if you prefer

http://forum.xbmc.org/showthread.php?tid=45972 explains it nicely (linked in one of those wiki pages)
Reply
#9
SwedishGojira Wrote:I found this and this.

Yep, these are the correct pages.

Quote:I have a button on my Imon-pad that IRW idConfused as "AspectRatio".
On this button I want the XBMC function of the same name, "AspectRatio".

First get the real LIRC button name. Start a terminal and enter "irw" - then press your AspectRatio button and see what name LIRC reports. Let's assume that the LIRC button name is Ratio. I chose another name here to make it easier to follow the rest of my post. Maybe the name of your button is AspectRatio, too - you have to check that.

Quote:I've tried adding this to my Keymap.xml :
Code:
<universalremote>
      <aspect>AspectRatio</aspect>
    </universalremote>

No, that's not the way it works. You can either treat your remote as a XBMC remote *OR* treat it as a universal remote. In the standard configuration your remote is treated as a XBMC remote and therefore you have to edit the <remote> section and not the <universalremote> section.

But you have to start with adjusting your Lircmap.xml and then you edit the Keymap.xml.

Quote:and this to my Lircmap.xml :
Code:
<aspect>AspectRatio</aspect>

But it didn't work so I guess I've understood it wrong...

Well, you understood the concept, but not the way XBMC works. XBMC defines some "button strings" which can be mapped to your remote's buttons. You can find all valid button strings on the Keymap.xml page in the wiki (http://wiki.xbmc.org/?title=Keymap.xml - Section: Remote Buttons). There is a table and the first column named "button string" defines all strings which are valid. YOU CAN NOT DEFINE YOUR OWN BUTTON STRINGS! This is important and a common mistake [you did it :-)].

Now that you know which button strings are valid, you can map them to the names of your remote's buttons in Lircmap.xml. The format of an entry is:

Code:
<button string> LIRC button name </button string>

So if you want to map the button Ratio you have to first find a button string which you do not already use. Check the <remote device="YOU_REMOTE_NAME"> section in Lircmap.xml which belongs to your remote and compare it to the button string table in the wiki. You need a button string which is not mapped to a remote button, yet. Let's suppose you do not use the button string star, yet. Map the button string "star" to the button name "Ratio" in Lircmap.xml:

Code:
<star>Ratio</star>

Now you have to edit your Keymap.xml file and map the button string "star" to the XBMC action "AspectRatio". You have to do this in one of the <remote> sections of Keymap.xml, as you use predefined button strings.

Code:
<keymap>
  <global>
    <remote>
     <star>AspectRatio</star>
     <....>....</....>
    </remote>

    <.....>
     <...>....</...>
    </....>
  </global>
</keymap>

That's it if you only want to map a few more buttons. But what happens if your remote has many more buttons than "button strings" are available? Then you have to follow this guide: http://forum.xbmc.org/showthread.php?tid=45972
This will convert your remote configuration into a universal-remote configuration which lets you map up to 256 buttons.

Temar
Reply

Logout Mark Read Team Forum Stats Members Help
Add functions to buttons on remote0