Problem: How to map unknown keys?
|
9th Nov, 2014, 11:29 PM
Post: #1
|
|||
|
|||
How to map unknown keys?
Hi,
I've got a new remote control - Mele F10 Deluxe - and it has some buttons that XBMC does not known. If I look into the log file, I see for example: 14:25:38 T:3037372416 DEBUG: CLinuxInputDevice::KeyEvent: TranslateKey returned XBMCK_UNKNOWN from code(139) The key code 139 is not defined in XBMC_keysym.h (https://github.com/xbmc/xbmc/blob/master/xbmc/input/XBMC_keysym.h) and has no mapping in LinuxInputDevices.cpp (https://github.com/xbmc/xbmc/blob/master/xbmc/input/linux/LinuxInputDevices.cpp). According to the XBMC wiki (http://kodi.wiki/view/List_of_XBMC_keynames), it should be possible to map unknown keys with the <key id="..."> XML element, but if I look to the source code (LinuxInputDevices.cpp), it is clear that it is not. Is there any way how to map this kind of buttons? Thank you! |
|||
12th Nov, 2014, 03:24 AM
Post: #2
|
|||
|
|||
RE: How to map unknown keys?
Hi,
I've got the same problem with mapping non standard keys. Did you find solution? |
|||
13th Nov, 2014, 06:11 PM
Post: #3
|
|||
|
|||
RE: How to map unknown keys? | |||
27th Nov, 2014, 03:07 AM
Post: #4
|
|||
|
|||
RE: How to map unknown keys?
look at
/usr/local/share/xbmc/system/keymaps/ in your installation. at the source code level the system level resolving is handled in xbmc/input/linux/LinuxInputDevices.cpp. if you check table keyMap, on the left is code returned from OS which is resolved into XBMC internal key code on the right. of course the key codes on left are OS specific but in this case linux provides the mapping in (/usr/)include/linux/input.h. looking into it 139 is KEY_MENU and indeed it is not defined in xbmc's xbmc/input/linux/LinuxInputDevices.cpp. if you would decide to try patching the code and recompile, then you would add into keyMap table this line: Code: { KEY_MENU , XBMCK_c }, or even directly with number Code: { 139 , XBMCK_c }, (in XBMC key"C" is key for display context menu.) Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here |
|||
30th Nov, 2014, 08:49 PM
Post: #5
|
|||
|
|||
RE: How to map unknown keys?
Thank you for your reply. I'm sure it is possible to get it working by patching the code and it is quite easy, but I was trying to find a solution without the need to patch the code. Now I see it is most likely not possible.
|
|||
6th Dec, 2014, 05:02 PM
Post: #6
|
|||
|
|||
RE: How to map unknown keys?
@hrbi
yes, exactly that means it. personally I don't see a reason not to try it. if there wasn't any special PROBLEM with code 139 (as indication why it is not recognised by default at all), we can put such small patch into next test build and you will try. but before you ask for that, try just simple googling for "139 keycode xbmc" if you get any relevant info (why it could be excluded by default). if you don't find anything in 10-15minutes, lets try include it. (looks like 139 should be key F18) that means we should not run into conflicts. Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here |
|||
« Next Oldest | Next Newest »
|