(2013-05-14 18:15)GreatEmerald Wrote: It's explained in the first post of this thread. Basically, you need to look for your remote keymap in `/etc/rc_keymaps/`.
The whole in-kernel LIRC works like this: the remote sends a scancode, the kernel catches it, it then parses the needed file in /etc/rc_keymaps/ to find out what scancode is supposed to represent what button. Then it submits the emulated keyboard event to the /dev/input system. All other applications bind to the /dev/input system and wait for keyboard events from there, that includes XBMC. Since the events are regular keyboard presses, the XMBC-specific bindings are controlled via Keyboard.xml.
Your workflow should be to edit the file in /etc/rc_keymaps so that every button is mapped to an actual keyboard key. Ideally, you shouldn't touch XBMC configuration at all, and just adapt the keymap to what is default in XMBC. Only once everything is set to a real keyboard key you can additionally tweak XBMC bindings to your liking (by using the actual keyboard key names, not some codes).
But are you limited to whatever amount of scancodes are in the original keymap files? For example I copied the imon_mce keymap file to /etc/rc_keymaps and then edited to get it working properly. I have full functionality of standard MCE buttons.
However if I want to add new custom buttons I have to use one of the existing unused MCE buttons in the imon_mce keymap file. For example I was able to change KEY_RED to be KEY_O instead and now the red button brings up the diagnostic info.
However it seems you cannot add in your own new scancodes to the keymap file? For example if I teach my Harmony remote control the keyboard command Ctrl+Alt+1 if I run irkeytable -t it does show a scancode for this, I tried adding this new scancode in to the keymap file and assigning a keyboard button to it and then ensuring in keyboard.xml that, that keyboard button would do the XBMC function I wanted. However it does not work.
So once I have used up all the spare MCE buttons like Red, Green, Yellow etc then what ?
I wrote about it all here in much more detail.