I just wanted to properly map the keys of the Android TV Remote Control app, or more specifically the Back button. So I first captured the keycodes via logging:
CAndroidJoystickState::ProcessEvent(type = key, keycode = 4, action = 0): pressed
CAndroidJoystickState: setting value for button [4 | 109] to 1
Button [ 4 ] on virtual-remote pressed
Empty button map detected for game.controller.default
Next step was to create keymap file which I named virtual-remote.xml:
<keymap>
<global>
<remote name="virtual-remote">
<button id="4">Back</button>
<button id="85">PlayPause</button>
</remote>
</global>
</keymap>
I placed it into a backup captured by the Kodi Backup add-on, then restored from that. I verified the file to be under:
/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/userdata/keymaps
So I restarted Kodi but unfortunately, the Back action is not captured. Log is still the same as above. What am I missing?
Where I wasn’t quite sure:
I took the name ‘virtual-remote’ from the log. I assume it is correct to apply that one in the XML?
I chose the remote tag in the XML. Do I have to use keyboard maybe?
The virtual-remote now appears twice under Input>Peripherals.
I am also attaching a log of the Kodi boot phase (with the above XML in place) and several non-working Back button presses. [LOG]