Lircmap.xml and keymap.xml loading in wrong order?
#1
Hi,

I've been playing with my remote key mappings to get a few custom mappings done. Not a whole lot of success so far. Looking at my log it seems to my way of thinking, that the Keymap.xml and Lirecmap.xml are being loaded in the incorrect order. Log snippet below:

Code:
09:57:46 T:3045259152 M:801005568    INFO: Loading special://xbmc/system/keymaps/gamepad.xml
09:57:46 T:3045259152 M:801005568    INFO: Loading special://xbmc/system/keymaps/joystick.AppleRemote.xml
09:57:46 T:3045259152 M:801005568    INFO: Loading special://xbmc/system/keymaps/joystick.Harmony.xml
09:57:46 T:3045259152 M:801005568    INFO: Loading special://xbmc/system/keymaps/joystick.Microsoft.Xbox.Controller.S.xml
09:57:46 T:3045259152 M:801005568    INFO: Loading special://xbmc/system/keymaps/joystick.Sony.PLAYSTATION(R)3.Controller.xml
09:57:46 T:3045259152 M:801005568    INFO: Loading special://xbmc/system/keymaps/joystick.WiiRemote.xml
09:57:46 T:3045259152 M:801005568    INFO: Loading special://xbmc/system/keymaps/keyboard.xml
09:57:46 T:3045259152 M:801005568    INFO: Loading special://xbmc/system/keymaps/Keymap.xml
09:57:46 T:3045259152 M:801005568   ERROR: Remote Translator: Can't find button fullscreen
09:57:46 T:3045259152 M:801005568   ERROR: Remote Translator: Can't find button eject
09:57:46 T:3045259152 M:801005568   ERROR: Remote Translator: Can't find button screensaver
09:57:46 T:3045259152 M:801005568   ERROR: Remote Translator: Can't find button visualization
09:57:46 T:3045259152 M:801005568   ERROR: Remote Translator: Can't find button aspect
09:57:46 T:3045259152 M:801005568   ERROR: Remote Translator: Can't find button audiotrack
09:57:46 T:3045259152 M:801005568   ERROR: Remote Translator: Can't find button subtitle
09:57:46 T:3045259152 M:801005568    INFO: Loading special://xbmc/system/Lircmap.xml
09:57:46 T:3045259152 M:801005568   DEBUG: CButtonTranslator::Load - no userdata Lircmap.xml found, skipping

It seems Keymap.xml is being loaded first and some buttons can't be found. This seems obvious to me as Lircmap.xml hasn't loaded yet so it shouldn't find any. So, how did it apparently find the rest of they buttons?

Here is my Lircmap.xml:

Code:
<lircmap>
    <remote device="mceusb">
        <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>ChanUp</pageplus>
        <pageminus>ChanDown</pageminus>
        <back>Back</back>
        <menu>Hash</menu>
        <play>Play</play>
        <info>More</info>
        <skipplus>Skip</skipplus>
        <skipminus>Replay</skipminus>
        <display>Teletext</display>
        <start>Home</start>
        <record>Record</record>
        <volumeplus>VolUp</volumeplus>
        <volumeminus>VolDown</volumeminus>
        <mute>Mute</mute>
        <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>
        <zero>Zero</zero>
        <fullscreen>Fullscreen</fullscreen>
        <eject>Eject</eject>
        <screensaver>SlideShow</screensaver>
        <visualization>Visualization</visualization>
        <aspect>Aspect</aspect>
        <audiotrack>Audio</audiotrack>
        <subtitle>Subtitle</subtitle>
    </remote>

And my Keymap.xml:

Code:
<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>ContextMenu</menu>
      <title>ContextMenu</title>
      <info>Info</info>
      <skipplus>SkipNext</skipplus>
      <skipminus>SkipPrevious</skipminus>
      <display>FullScreen</display>
      <start>XBMC.ActivateWindow(home)</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>
      <fullscreen>Fullscreen</fullscreen>
      <eject>XBMC.EjectTray()</eject>
      <screensaver>XBMC.ActivateWindow(ScreenSaver)</screensaver>
      <visualization>XBMC.ActivateWindow(Visualization)</visualization>
      <aspect>AspectRatio</aspect>
      <audiotrack>AudioNextLanguage</audiotrack>
      <subtitle>ShowSubtitles</subtitle>
    </remote>

Any help making sense of this much appreciate.

Thanks
Phil
Reply
#2
Your not naming your buttons in Lircmap.xml correctly as XBMC doesn't recognize:

<aspect>
<audiotrack>
<subtitle>
<eject>
etc.

Please look here for the buttons XBMC recognizes:

http://wiki.xbmc.org/?title=Keymap.xml

Been down this road already...
Reply
#3
I hate to bring up a month old thread, but isn't this kind of silly?

Why can't I define a button for <subtitle> in keymap?
And hell why do i have to assign a keymap entry just to assign an lircmap entry to begin with?
I think a better move would be towards a single key/lircmap file with a more straight forward structure.

I wanted a button to update my library, but instead of using:
<updatelibrary>UpdateLibrary(Video)</updatelibrary>
i have to use:
<recordedtv>UpdateLibrary(Video)</recordedtv>

Then add it to my lircmap from there. O.o The whole system seems overly limited and obtuse.

I guess I should make a feature request of some sort but I'm not exactly sure where to begin.

**edit not trying to sound bitchy or anything, I'm just a little frustrated at the process here.
Reply
#4
I don't see whats so difficult about lirckey > lircmap.xml > xbmckey > keymap.xml > xbmcaction. We need a translation layer, lircmap.xml is the configuration for this layer, deal with it.
Reply
#5
I'm not saying it's difficult, just a little frustrating. ^_^
I thought perhaps if I brought it up people might start a dialog about it and some ideas might flow.

*shrug*
Reply
#6
you can abstract it to OBC codes if you like. Makes it easier to deal with in my mind.



noumenon
Reply
#7
Yeah, the keymap is kind of hard to deal with, but I think you're working in the wrong direction. I mentioned that you had to change your lircmap to work with the keymap. Think of it as a two way street, but start with the lircmap and map similar buttons that already exist in keymap, and then for the ones that don't really exist you should be able to use universal remote codes to do the rest. It's been a while since I setup my keymap but I recall using universal remotes to do some special things that I wanted to happen from my remote.
Reply
#8
althekiller Wrote:I don't see whats so difficult about lirckey > lircmap.xml > xbmckey > keymap.xml > xbmcaction. We need a translation layer, lircmap.xml is the configuration for this layer, deal with it.

Whats so difficult?

1) Realising that is the relationship. Maybe it's blindingly obvious to you what's happening but it isn't to a beginner. Couple that with all the outdated information out there, and it can be quite time consuming trying to figure out just what exactly is going on.

2) I don't see why you can't define your own button identifiers in Lircmap.xml and have xbmc recognise them. Why restrict people to the button keynames listed here , what is so great or special about them?
Reply
#9
The main reason we have the two files is that the keymap XML file allows per-window mappings of the same key (i.e. the same key can do different things in each window). Thus we have an intermediate layer. It could probably be done with a single file (and a patch would be considered) but ideally the keymapping stuff should be overhauled anyway - per window is a silly way to map things in most cases - it should be contextual instead (eg "navigating", "playing video", "playing music" etc.)

Cheers,
Jonathan
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
Reply
#10
althekiller Wrote:I don't see whats so difficult about lirckey > lircmap.xml > xbmckey > keymap.xml > xbmcaction. We need a translation layer, lircmap.xml is the configuration for this layer, deal with it.

not all of us are developers and understand these complicated things. I've been googling for days for an answer to try and define a few buttons on my remote and this makes me Sad

edit: this really helped me

Quote:To see what your remote is sending, go to the settings in xbmc and turn on debugging. Hit the key you want the settings for. Then ssh into the openelec install and go to /storage/.xbmc/temp and open the xbmc.log. The you should see something similar to what i posted earlier.

Download winscp, that makes it a lot easier to navigate around and edit files then plain old putty.

You can set the obc to any unused number.I just randomly picked obc 1, 2 and 3. Just make sure it doesn't clash with the existing keys used by XBMC. This guide helped somewhat. The universal remote section.

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

Essentially it goes something like this. Lirc recieves the raw data from the remote. 00xf32 or some rubbish like that. The makers of openelec have mapped that raw code to some names in the eventlirc.

That's where the KEY_PRINT and KEY_RADIO and stuff comes about. But XBMC doesn't know about those.

Once again, the makers have kindly mapped the most common ones to XBMC useable keys. I think these are the ones found in mediacenter.rem. So we just have to map the additional keys that we want so that XBMC knows what to do with them.

But because XBMC is limited to a number of predefined key names, we end up having to use the universal remote or obc# method. Think of the obc as additional key names that can be used in XBMC. Hence we are allowed to pick whatever we want as long as they don't clash.
Reply
#11
there's info in the wiki and stickies in this forum.

you can't invent buttons. you have two choices; either you map it to the set of predefined buttons, or you have to use obc codes (and <universalremote> mappings).
Reply
#12
I think the developers need to take a step back, breath in deep and realise just how rediculous this system really is.....

I've gone round and round and round just trying to map a couple of buttons on my remote to basic commands and constistently come up no where.
No matter what I do it seems I can't get my head around this, and I don't think it's just because I'm thick Smile (I do quite a bit of scripting and programming in other areas).

I have read LOTS of stickies and wikis and related articles across the web and there is LOTS of confilicting and obsfucating information about how to do this very basic task. I have spent HOURS on this - and I mean HOURS. Just to get a couple of basic remote keys mapped.

Time and time again I see errors in the logs like:-

"ERROR: Remote Translator: Can't find button skip_plus"

so I read some more 'advice' and make changes to then get:-

"ERROR: Remote Translator: Can't find button skipnext"

and the pattern continues....

Round and round and round and round in bigger increasing circles.............



This really should (and can) be so much more straight orward. Now I understand that there is probably legacy reasons for these extra (un-needed) layers. But come on.
Reply
#13
Wow, you dug up a relic. Big Grin <-------EDIT

I dont think its ridiculous at all. It will only take you a few minutes to grasp it.

Have a look at this page. Specifically post 24 & 26


http://forum.xbmc.org/showthread.php?tid=150228&page=3



(2013-10-02, 10:06)RichG Wrote: I think the developers need to take a step back, breath in deep and realise just how rediculous this system really is.....

I've gone round and round and round just trying to map a couple of buttons on my remote to basic commands and constistently come up no where.
No matter what I do it seems I can't get my head around this, and I don't think it's just because I'm thick Smile (I do quite a bit of scripting and programming in other areas).

I have read LOTS of stickies and wikis and related articles across the web and there is LOTS of confilicting and obsfucating information about how to do this very basic task. I have spent HOURS on this - and I mean HOURS. Just to get a couple of basic remote keys mapped.

Time and time again I see errors in the logs like:-

"ERROR: Remote Translator: Can't find button skip_plus"

so I read some more 'advice' and make changes to then get:-

"ERROR: Remote Translator: Can't find button skipnext"

and the pattern continues....

Round and round and round and round in bigger increasing circles.............



This really should (and can) be so much more straight orward. Now I understand that there is probably legacy reasons for these extra (un-needed) layers. But come on.
Reply
#14
Thanks FishOil - apologies for the rant yesterday, was getting somewhat frustrated (as you can probably tell).

I have now managed to get this working (after much unneccesary toil) - I wish I had seen the thread you linked to sooner as it would have helped a great deal, but like I said in my post, there is so much other information scattered aroundm much of which contradictory or badly explained, its very hard to find the really useful stuff. Perhaps someone could make a good Wiki entry that explains it as well as you do ;-)

I dug up this relic thread, but could of chosen many, many others as it seems this is a very common area of misunderstanding and frustration, which seems to back up my point of it being not as straight forward as it should be.
Reply
#15
(2013-10-03, 17:32)RichG Wrote: Thanks FishOil - apologies for the rant yesterday, was getting somewhat frustrated (as you can probably tell).

I have now managed to get this working (after much unneccesary toil) - I wish I had seen the thread you linked to sooner as it would have helped a great deal, but like I said in my post, there is so much other information scattered aroundm much of which contradictory or badly explained, its very hard to find the really useful stuff. Perhaps someone could make a good Wiki entry that explains it as well as you do ;-)

I dug up this relic thread, but could of chosen many, many others as it seems this is a very common area of misunderstanding and frustration, which seems to back up my point of it being not as straight forward as it should be.

If you dont understand, the question must be asked. No big deal.

LIRC and XBMC remotes can be pretty confusing but just a few minutes and a good explanation it all comes together.

IMO it works pretty well the way it is.

I was just kidding about digging up a relic. Guess I should have put a smiley. Big Grin
Reply

Logout Mark Read Team Forum Stats Members Help
Lircmap.xml and keymap.xml loading in wrong order?0