The IR kernel drivers look like a keyboard to XBMC, so the Lircmap.xml is not used and can not be this approach. All changes to key mapping of the remote must be done through keyboard.xml.
I have made this work on Ubuntu Natty and it will probably work on Maverik, but I am not sure. Definitely will not work on anything earlier due to the kernel version.
I have this working on a PC with a MCE USB receiver (built-in), as well as on a Asrock 330HT using the internal IR receiver with the kernel nuvoton driver.
There are a couple of problems that we must work around. First install the ubuntu ir-keytable package
apt-get install ir-keytable
Now there is a bug in that version that causes it to ignore key codes greater than 0x80000000. So do the following:
git clone http://linuxtv.org/git/v4l-utils.git
apt-get install autoconf
apt-get install libjpeg62-dev g++
cp ./ir-keytable /usr/bin
EDIT: Apparently ir-keytable is fixed in oneiric.
If your using an xbmcfreak version, then do the following
Comment echo none +lirc > /sys/class/rc/rc0/protocols in /etc/rc.local
Now we're going to temporarily disable lirc. So
mv /etc/init.d/lirc /etc/init.d/lirc1
If you feel comfortable, just go ahead and remove LIRC instead.
now reboot, then run ir-keytable, and you should see something like
Quote:Found /sys/class/rc/rc0/ (/dev/input/event2) with:
Driver mceusb, table rc-rc6-mce
Supported protocols: NEC RC-5 RC-6 JVC SONY LIRC
Enabled protocols: RC-5 RC-6
Name: Media Center Ed. eHome Infrared
bus: 3, vendor/product: 0471:0815, version: 0x0000
Repeat delay = 500 ms, repeat period = 33 ms
The important thing is that the MCE receiver is recognized and that RC-6 is enabled. If this doesn't work, grep for mce in dmesg to see if there are errors loading the kernel driver.
Next run ir-keytable -t
press some keys on your remote and you should see things like
Quote:1320643260.849486: event MSC: scancode = 800f041e
1320643260.849498: event key down: KEY_UP (0x0067)
1320643260.849500: event sync
1320643260.968489: event MSC: scancode = 800f041e
1320643261.219926: event key up: KEY_UP (0x0067)
1320643261.219933: event sync
1320643261.682490: event MSC: scancode = 800f0421
1320643261.682502: event key down: KEY_RIGHT (0x006a)
1320643261.682504: event sync
1320643261.788502: event MSC: scancode = 800f0421
1320643262.039923: event key up: KEY_RIGHT (0x006a)
1320643262.039930: event sync
Now the next problem is that the kernel ir drivers generate keyboard scan codes greater than 255 for some keys. Xorg does not recognize these, in fact it ignores them. Until there is an overhaul of Xorg to fix this, we must work around it otherwise XBMC will never get the keys.
Create a new mapping file in /etc/rc_keymaps, call it rc6_mce
# table rc6_mce, type: RC-6
0x800f040c KEY_KPSLASH # Power
0x800f040d KEY_C # Left Meta, Start
0x800f040f KEY_I # Info
0x800f0410 KEY_PAGEUP # Volume Up
0x800f0411 KEY_PAGEDOWN # Volume Down
0x800f0414 KEY_F # Fast forward
0x800f0415 KEY_R # Rewind
0x800f041a KEY_NEXTSONG # Skip Next
0x800f041b KEY_PREVIOUSSONG # Skip Previous
0x800f0422 KEY_ENTER # Ok
0x800f0423 KEY_BACKSPACE # Back / Exit
0x800f045c KEY_O # Green
0x800f045e KEY_Z # Blue
This is largely based on the default file.
Now run ir-keytable like this
Quote:ir-keytable -c -p RC-5,RC-6 -w /etc/rc_keymaps/rc6_mce
Next re-run ir-keytable -t to make sure it still works.
Now we want our new mapping file to be loaded at startup, so create a file xbmc-ir-keytable.conf in /etc/init (note in init NOT init.d) as follows
start on (filesystem and stopped udevtrigger)
logger "Setting IR Keymap..."
/usr/bin/ir-keytable -c -p RC-5,RC-6 -w /etc/rc_keymaps/rc6_mce
Ok, now we need to remap the keys in xbmc to work. Need to add a keyboard.xml to .xbmc/userdata/keymaps. See next post for contents of my keyboard.xml
This is based on the default file and modified to my preferences. Note that there does seem to be an issue with the recent git of xbmc. You use to be able to look for the scancode of unmapped/unknown keys in the log and use something like <key id='65446'>, but the with recent overhauls, this seems to no longer work.
That should be it, it should work. The only thing that's a bit of a pain, is that if you press and hold a key, the repeat frequency seems very, very high. I haven't got around to tuning that yet.