Kodi Community Forum

Full Version: MCE remote special keys: KEY_INFO, KEY_EPG, ...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have XBMC 12 working on an Ubuntu 14.04 (Linux 3.13.0-24-generic, x86-64). My problem is that some keys on the MCE IR remote (a one-for-all programmed to emulate a Cinergy remote) do not trigger any action in XBMC. Only the buttons causing KEY_INFO, KEY_EPG, and KEY_TEXT are affected.

KEY_MENU works, but I don't understand why - more on that below.

I checked with ir-keytable, I do get the key events there:
# ir-keytable --test --device=/dev/input/event10
Testing events. Please, press CTRL-C to abort.
1400704114.455147: event type EV_MSC(0x04): scancode = 0x1442
1400704114.455147: event type EV_KEY(0x01) key_down: KEY_MENU(0x0001)
1400704114.455147: event type EV_SYN(0x00).
1400704114.555140: event type EV_MSC(0x04): scancode = 0x1442
1400704114.555140: event type EV_SYN(0x00).
1400704114.655138: event type EV_MSC(0x04): scancode = 0x1442
1400704114.655138: event type EV_SYN(0x00).
1400704114.907008: event type EV_KEY(0x01) key_up: KEY_MENU(0x0001)
1400704114.907008: event type EV_SYN(0x00).
1400704117.863147: event type EV_MSC(0x04): scancode = 0x1416
1400704117.863147: event type EV_KEY(0x01) key_down: KEY_INFO(0x0001)
1400704117.863147: event type EV_SYN(0x00).
1400704117.963138: event type EV_MSC(0x04): scancode = 0x1416
1400704117.963138: event type EV_SYN(0x00).
1400704118.215002: event type EV_KEY(0x01) key_up: KEY_INFO(0x0001)
1400704118.215002: event type EV_SYN(0x00).

Here's evinput:

Event: time 1400704261.523207, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1442
Event: time 1400704261.523207, type 1 (EV_KEY), code 139 (KEY_MENU), value 1
Event: time 1400704261.523207, -------------- SYN_REPORT ------------
Event: time 1400704261.623199, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1442
Event: time 1400704261.623199, -------------- SYN_REPORT ------------
Event: time 1400704261.723182, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1442
Event: time 1400704261.723182, -------------- SYN_REPORT ------------
Event: time 1400704261.975000, type 1 (EV_KEY), code 139 (KEY_MENU), value 0
Event: time 1400704261.975000, -------------- SYN_REPORT ------------
Event: time 1400704267.823144, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1416
Event: time 1400704267.823144, type 1 (EV_KEY), code 358 (KEY_INFO), value 1
Event: time 1400704267.823144, -------------- SYN_REPORT ------------
Event: time 1400704267.923153, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1416
Event: time 1400704267.923153, -------------- SYN_REPORT ------------
Event: time 1400704268.023130, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1416
Event: time 1400704268.023130, -------------- SYN_REPORT ------------
Event: time 1400704268.275004, type 1 (EV_KEY), code 358 (KEY_INFO), value 0
Event: time 1400704268.275004, -------------- SYN_REPORT ------------


I ran "xbmc --debug" and see in xbmc.log that the menu key triggers an action:
22:17:54 T:140002398783424 DEBUG: Keyboard: scancode: 0x93, sym: 0x006d, unicode: 0x0000, modifier: 0x0
22:17:54 T:140002398783424 DEBUG: OnKey: m (0xf04d) pressed, action is Move

Nothing happens for the other three buttons.

What I don't understand is how XBMC maps KEY_MENU to m (0xf04d). The documentation that I have seen about IR remotes and XBMC assume that lircd or inputlirc are used, which seems overkill to me. I have some device entries in /usr/share/xbmc/system/Lircmap.xml with <menu>KEY_MENU</menu> but is that used at all?

I tried creating my own ~/.xbmc/userdata/Lircmap.xml:

<lircmap>
<remote device="linux-input-layer">
<altname>cx23885_remote</altname>
<altname>devinput</altname>
...
<info>KEY_INFO</info>

I see in the log that it gets loaded, but it remains unclear whether it actually gets used. Probably not, because KEY_INFO still doesn't do anything.

Any idea?