Kodi Community Forum

Full Version: Generic Android Remote - Keymap Reprogram Issue
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey There Everyone,

Huh Got a question, thought this would be the place to ask.

I have a generic remote for my android 4.4 box that's running XBMC with the Launcher from the start. Here's a photo of the controller on the left: http://ecx.images-amazon.com/images/I/51...SX425_.jpg

When I'm using the device, and touch the Home button, the system seems to reset itself (it's the button in the upper left with the house...duah). What I'd like that button to do is to take me directly to the XBMC home screen without resetting the system (like when you press Tab on a keyboard).

I've used the Keymap Editor for some of the other buttons, but the issue with the Home button is that when you use it (to try to figure out what code # it is), the system restarts, and doesn't record the change.

I'm not super technically inclined, but my next step will be to use the debugging log and then go through and look at all the buttons when I press Home.

Anyways, if anyone has some advice about how to reprogram the Home button, that'd be great.

Cheers.
Unfortunately, Kodi cannot catch the Home button, it's intercepted at the Android level.
(2015-02-03, 17:21)Koying Wrote: [ -> ]Unfortunately, Kodi cannot catch the Home button, it's intercepted at the Android level.

Darn. Would that mean I would need to change the keymap of the android device? Or is that something that is locked away without some serious programming knowledge?
I am using CS918 Plus TV box, RK3288 based, with Android 4.4: http://i00.i.aliimg.com/wsphoto/v0/32319...-Watch.jpg.
The original remote control does not really fit for Kodi. I have found the file /system/usr/keylayout/rkxx-remotectl.kl (the device is rooted!). This file contains scan codes and corresponding key codes.
Then I installed KeyTest.apk. This free utility allows to find out what scan code is generated by each button on the remote control. Actually, I have commented out all the lines first to let KeyTest intercepting any keystroke. Finally, I have created my own rkxx-remotectl.kl file. The modified lines are:

key 114 MEDIA_REWIND
key 115 MEDIA_FAST_FORWARD
key 158 BACK
key 103 DPAD_UP
key 108 DPAD_DOWN
key 105 DPAD_LEFT
key 106 DPAD_RIGHT
key 232 DPAD_CENTER
key 139 MENU
key 102 ESCAPE
key 188 E
key 190 I
key 113 MEDIA_STOP
key 189 RIGHT_BRACKET
key 187 LEFT_BRACKET
key 111 DEL
key 400 PAGE_UP
key 401 PAGE_DOWN
key 402 MEDIA_PLAY_PAUSE

Now my remote control works with Kodi well.