(2014-01-14, 10:32)cable_guy Wrote: that's really good of you. I assumed you wouldn't find my reply due to the date of the last post! I will try creating this remote.xml in the keymaps folder tonight as I just received the remote and was annoyed that the "pictures" etc buttons didn't work as they seem perfect for opening the relevant category :-) thanks again
I had this thread subscribed so I saw your message.....
You do realize most of the messing around with this remote is no longer needed?
Modern systems like openelec / (xbmc live?) recognize every button on this remote and all key presses are now handled by lircinput to send inputs to XBMC.
This also means you can run scripts easily using irexec.
The remote buttons are mapped to XBMC inputs via the Lircmap.xml (which you have to copy to writable area storage/.xbmc/userdata/Lircmap.xml to make changes)
Only XBMC keymap changes I like to make now is that power button opens power menu not switch off PC.
If you try openelec (you can run it off a usb stick its tiny)
then to change keymap all you have to do is:
Code:
cp /usr/share/xbmc/system/keymaps/remote.xml /storage/.xbmc/userdata/keymaps/
vi /storage/.xbmc/userdata/keymaps/remote.xml
and in my case edit
Code:
<power>XBMC.ShutDown()</power>
to be
Code:
<power>XBMC.ActivateWindow(shutdownmenu)</power>
If you want to run a script on a keypress like Kill XBMC when a addon has crashed then use command
To display what keycode corresponds to what remote button press (they are fairly obvious)
In my case I want to use the Red Colour key at bottom (KEY_RED).
So first I want to stop that key from doing something else in XBMC so I edit
storage/.xbmc/userdata/Lircmap.xml and set KEY_RED to something madeup
Code:
<madeup>KEY_RED</madeup>
Create and edit
Code:
vi /storage/.config/.lircrc
Enter the following
Code:
begin
button = KEY_RED
prog = irexec
config = /bin/killall -9 xbmc.bin &
end
Set IRExec to run on startup
edit autostart.sh and add line
Code:
/usr/bin/irexec -d /storage/.config/.lircrc
Every button is on remote is full mapped and I can restart XBMC using the red key.
Suspend/Resume using the emprex remote also worked fully without any changes (although suspend breaks some things in XBMC).