How to map remote buttons on rpi2 using usb mce receiver

Hi, I’m running rasplex on a rpi2 (B I think, if that matters) and I’m using a harmony remote set up as an MCE remote with a USB receiver. This works out of the box beautifully, no problems. But, I want to remap a button on the remote. Specifically I want to run a shell script from a remote button press.

I have searched for and followed various guides but they all seem to relate to LIRC receivers and go a level deeper than I need, setting up the underlying codes and mapping them to remote buttons, which are then mapped to application functions in the keymap. This is already done out of the box for the MCE remote. All I want is to remap one of the buttons that already work.

I have found other guides that suggest using an MCE keyboard instead of the remote, to enable things like the context menu. But this seems only to work to enable already mapped keyboard keys (i.e. it gives you the ability to hit the C key).

I have tried creating a remote.xml file and putting it in userdata/keymaps. This is how I have done the same thing in openelec in the past and it works no problem. However it appears that Rasplex is ignoring this file.

Is there any guide that I can follow to simply remap an MCE remote button to perform another function?

tHanks.

forums.plex.tv/discussion/172270/execute-script-from-remote-control-button

Thanks for the help. It’s now working. The problem was, as ever, with the user. I had copied the remote.xml action from an XBMC file and didn’t change the filepath to .plexht. The mappings were working fine all along, it just doesn’t know where the .xbmc folder is.