Editing LIRC commands?

OK, a bit confused between all the XBMC, OpenELEC and Rasplex documentation.  For the latest 0.5.1 Rasplex on a RPi2, I need help with the following:

 

I made it easy on myself and bought an IR receiver and a MCE remote.  95% of the keys work out of the box, although I don't know how since I can't seem to find a LIRC.CONF file anywhere.

 

What I need to do is edit a few of the buttons to do something else in Rasplex, since I see some other commands are available from keyboard input and I find them useful (subtitles, audio toggles, Info, etc).

 

Where, or how do I create this override XML file?  How do I map it to specific Openelec or PHT commands? I'm getting mixed info from the documentation sources.

 

OK, a bit confused between all the XBMC, OpenELEC and Rasplex documentation.  For the latest 0.5.1 Rasplex on a RPi2, I need help with the following:
 
I made it easy on myself and bought an IR receiver and a MCE remote.  95% of the keys work out of the box, although I don't know how since I can't seem to find a LIRC.CONF file anywhere.
 
What I need to do is edit a few of the buttons to do something else in Rasplex, since I see some other commands are available from keyboard input and I find them useful (subtitles, audio toggles, Info, etc).
 
Where, or how do I create this override XML file?  How do I map it to specific Openelec or PHT commands? I'm getting mixed info from the documentation sources.


All you need to do is create a keymap.xml file that remaps existing keys or new keys to the functions you are missing. The file goes in /storage/.plexht/userdata/keymaps.

have a look at this http://danielmaclean.blogspot.co.uk/2011/08/openelec-remote-control-setup.html

Deleted.

Deleted.  (Would just jumble the solution at the end)

I struggled with GPIO IR and trying to get it working. In the end i just bought a flirc usb dongle for $22 and never looked back. Extremely easy to program with the windows or mac software and works perfectly. I programmed my harmony remote to control my Rasplex but it will work with any IR remote including MCE. I highly recommend it.

The FLIRC is even worse for me.  Stuck keys, some commands not working.  I'd prefer to get regular LIRC working if I can crack the code, but nobody seems to know what it is.

The key to using the flirc dongle is to NOT use the xmbc profile. Switch over to full keyboard and then program per the PlexHT keyboard shortcuts https://support.plex.tv/hc/en-us/articles/201670487-Keyboard-Shortcuts

I've been unable to set a keymap for LIRC too. The remote works with basic functions, but none of my remote.xml commands work.

All you need to do is create a keymap.xml file that remaps existing keys or new keys to the functions you are missing. The file goes in /storage/.plexht/userdata/keymaps.

This might be one of my many problems.  It is keymap.xml or remote.xml?

I'm using an MCE Remote which is already recognized by Plex (lirc.conf is baked in) but having a problem getting any of those keys remapped to something else.  Here is what I have so far:

 /storage/.plexht/userdata/Lircmap.xml

   
       KEY_PAUSE
       KEY_PVR
       KEY_INFO
       KEY_TV
       KEY_NUMERIC_STAR
       KEY_ANGLE
       KEY_DVD
   

/storage/.plexht/userdata/keymaps/remote.xml

  
    
      PlayPause
      NextSubtitle
      CodecInfo
      AudioNextLanguage
      ContextMenu
      AspectRatio
      tab
    
  

    
      PlayPause
      NextSubtitle
      CodecInfo
      AudioNextLanguage
      ContextMenu
      AspectRatio
      tab
    


Not only does it not work, but having that Lircmap.xml file stops those particular keys from working in their original way.  ie.  Instead of PAUSE pausing, or even doing the new XBMC function (PlayPause), it doesn't do anything.  Same with KEY_INFO.  Instead of bringing up the Movie info page, it doesn't do anything.  I'd prefer it bring up the Codec info instead. Deleting Lircmap.xml puts it back to a normal MCE remote.

So I don't know if that means the buck stops at Lircmap.xml or if something in remote.xml is bad and it doesn't understand those commands.

Help!

OK, I finally got it working 99%.  I have no idea why, but after throwing stuff at the wall, it seems to do what I want now except for Aspect Ratio.  I want to map the bottom row of buttons on my MCE remote to other commands since they don't do anything, and change two others.

The remote I have is this.

KEY_PAUSE to Play/Pause instead

KEY_INFO to Codec Info instead of brief movie info

KEY_PVR to subtitle selection

KEY_TV to Audio track selection

KEY_ANGLE to movie info (I think it does it already)

KEY_EPG to Aspect Ratio selection

That bottom one still does not work.  I can't seem to find the predetermined OpenELEC/XBMC command that activates it.

Anyway, I only need a Lircmap.xml.  Using remote.xml does nothing. I assume it's because the MCE remote it baked in.  And by following all the available directions online, you would think my previous post was correct.  Nope.

This is it:


   
       KEY_PAUSE
       KEY_PVR
       KEY_INFO
       KEY_TV
       KEY_NUMERIC_STAR
       KEY_ANGLE
       KEY_EPG  ; not working
   

If anyone can explain why that works, I'm all ears. But more importantly, I need that bottom key fixed.  I tried select, enter and a bunch of other things but no-go.  It's only there as a placeholder.

There is no way that I know of to map keys to new functions, but I'm happy I got this far.  It seems I cannot use actual XBMC functions, but am required to use a button already assigned to them.

I finally cracked the code!  You use a combination of XBMC functions that are already assigned, and then create new ones that are not being used by you.  You do indeed need a remote.xml file for anything custom.  I now have Aspect Ratio working.  I used green & blue as keys since I don't have them on my remote.  Here they are:

Lircmap.xml


   
       KEY_PAUSE
       KEY_INFO
       KEY_NUMERIC_STAR  
       KEY_PVR
       KEY_TV
       KEY_ANGLE
       KEY_EPG
   

remote.xml


  
    
      ContextMenu  
      AspectRatio
    
  

I finally cracked the code!  You use a combination of XBMC functions that are already assigned, and then create new ones that are not being used by you.  You do indeed need a remote.xml file for anything custom.  I now have Aspect Ratio working.  I used green & blue as keys since I don't have them on my remote.  Here they are:
 
Lircmap.xml

   
       KEY_PAUSE
       KEY_INFO
       KEY_NUMERIC_STAR  
       KEY_PVR
       KEY_TV
       KEY_ANGLE
       KEY_EPG
   

remote.xml
  
    
      ContextMenu  
      AspectRatio
    
  


Glad you managed to get this sorted, sorry, I have been away for a few days. Welcome to the mysterious world of LIRC.

Can you please mark your last post as answered, it may help others find the your solution quicker.

Thanks

Hi guys,
Where can I found the remote comande such as AspectRatio/ContextMenu ?
I found some stuff > /usr/share/XBMC/system/Lircmap.xml

Can we map IRcode directly to specifc keys: (https://support.plex.tv/hc/en-us/articles/201670487-Keyboard-Shortcuts)

Dominique

Sorry, I don’t quite understand your question

Yes, those are the correct commands

Not really, not exactly. You normally map them to a function and not to a specific key. For example ENTER is sometimes calls to SELECT, sometimes to OSD and sometimes to PlayPause as they are context sensitive. Have a look here to see all commands you can pass

But there are ways to map them to actual key presses if you need to

Hi,
I just would like to display sound menu, or subtitle menu with my Ir remote controler directly.
I’ll have a look with your link.

Yes, map them during full screen video or videoosd on yourxml file following keyboard.xml. That way you can reuse those buttons for other functions if you are in the menus.

If you want to map that key to that function even if it’s of no use in the rest of the UI, map them to global

It works !

There is a mix between Kodi/OpenElec/Rasplex so I share my results :wink:

To avoid, Remote Translator: Can't find button , I understood that you can only map code included in TranslateRemoteString()

You can use default mapping, or add your owns via /storage/.plexht/userdata/keymaps/remote.xml

Lircmap.xml
There is some simple button with perfect default value

button Description
<power> To shutdown … you cannot poweron remotely
<mute> To mute
<info> info
<menu> menu
<back> Back
<select> Select

I spent a lot of time to find thoses one

button Description
<volumeminus> Volume Down
<volumeplus> Volume Up
<language> Switch to next Lang
<subtitle> Switch to next subtitle
<display> Toggle to playback

keymaps/remote.xml
There is differents parts (global/FullscreenVideo) you need to choose the right one to avoid strange behaviour. You can remap button to different fonction.

I finally find a trick for aspectRatio:
Add in Lircmap.xml a tag with your Lirc key : <hash>KEY_P</hash>
And add mapping information into /storage/.plexht/userdata/keymaps/remote.xml

<keymap>
   <global>
     <remote>
	<pageplus>Screenshot</pageplus>
     </remote>
   </global>
<FullscreenVideo>
     <remote>
        <hash>AspectRatio</hash>
     </remote>
</FullscreenVideo>
</keymap>