CEC remote codes hardcoded?
#1
Hi,

I'm trying to map some buttons of my reciever remote to XBMC but it seems XBMC sees 2 different buttons as the same button.
Here's the log from XBMC for the 2 buttons:
DEBUG: CecLogMessage - key pressed: root menu (9)
DEBUG: PushCecKeypress - received key f7 duration 0
DEBUG: OnKey: 247 (0xf7) pressed, action is PreviousMenu

DEBUG: CecLogMessage - key pressed: contents menu (b)
DEBUG: PushCecKeypress - received key f7 duration 0
DEBUG: OnKey: 247 (0xf7) pressed, action is contextmenu

I tried editing remote.xml with <9>, <b>, <button id="9">, <root menu>, <contents menu>, but the only thing that works is <key id=247> which is the same for both keys.

I did some searching and found PeripheralCecAdapter.cpp. On line 925 I find the "case CEC_USER_CONTROL_CODE_CONTENTS_MENU" entry and if I understand it correctly XBMC sends this command to the same IR command as "case CEC_USER_CONTROL_CODE_ROOT_MENU".
Does this mean this is hardcoded and the only way to change it is to recompile?

If I change line 921-930 to:
Code:
case CEC_USER_CONTROL_CODE_SETUP_MENU:
case CEC_USER_CONTROL_CODE_CONTENTS_MENU:
  xbmcKey.iButton = XINPUT_IR_REMOTE_TITLE;
  PushCecKeypress(xbmcKey);
  break;

case CEC_USER_CONTROL_CODE_FAVORITE_MENU:
case CEC_USER_CONTROL_CODE_ROOT_MENU:
  xbmcKey.iButton = XINPUT_IR_REMOTE_MENU;
  PushCecKeypress(xbmcKey);
  break;
I assume the buttons will be separated. Do I need to compile the complete XBMC(or in my case OpenElec), or can I just compile and then replace one file on my HTPC?
Or can you separate the buttons in the official XBMC? (contents menu and root menu are different things. It makes no sense to map them to the same button without the option to remap).

From the log in my first post, it was clear that XBMC does see 2 different keys. Is there any way to map a key based on the "root menu" or "9" from this log without recompiling?
Reply

Logout Mark Read Team Forum Stats Members Help
CEC remote codes hardcoded?0