Android Home/End/F1-12 Keys on Physical QWERTY Keyboard not passed to Kodi
#1
Recently, I switched my HTPC from Windows PC based platform to an Android box and I noticed an issue with passing some QWERTY physical keyboard codes to Android Kodi. Most of all, I’m frustrated with the lack of support for Home, End and F1-F12 keys. Initially, I thought that I have a problem with my keyboard, key mappings and handling in the Android, or Android device itself, but it seems that is not the case. I have a Logitech K400 keyboard which is well supported on many Android platforms and I did the tests with different Android-based devices. Luckily, on my job I have access to different Android devices so I did the tests with Nexus 7 2013, Nexus Player, Minix Neo X-8H Plus, Amazon Fire TV, plus few HTC and Samsung based tablets and phones. But it is always the same: the codes for mentioned keys are not passed to the Kodi.
I used Android apps like “External Keyboard Helper”, “Multilanguage Keymap Redefiner” to verify that key codes are passed to the Android and it seems that everything is fine, so e.g. when I’m pressing End key the Android key code 107/MOVE_END is sent as it should. But when I’m in Android Kodi in some list view (e.g. Movies list), when I’m pressing End key, nothing happens. I tried to use Keymap Editor Add-on, but it just confirmed my suspicions – the mentioned key press does not reach Kodi, so the appropriate actions (e.g. “Last Page” for End key) are not executed.
Any suggestion how this issue can be solved (if it is possible at all) Sad?
Reply
#2
Take a look in the qwerty.kl file (or similar for later versions of android). While the device can pick up the relevant key code press (i.e. 107) it may not pass the relevant command on to android apps unless it is defined in there. Since you are getting the MOVE_END part too that might not be the case, but it is worth checking.

Is the problem only with Kodi or do other apps not respond to those buttons, also have you tried a USB keyboard?
Reply
#3
(2016-02-04, 18:02)jakejm79 Wrote: Take a look in the qwerty.kl file (or similar for later versions of android). While the device can pick up the relevant key code press (i.e. 107) it may not pass the relevant command on to android apps unless it is defined in there. Since you are getting the MOVE_END part too that might not be the case, but it is worth checking.

Is the problem only with Kodi or do other apps not respond to those buttons, also have you tried a USB keyboard?

jakejm79, thanks for the suggestion, but I did it already. It is generic.kl file on my device that is used and the key code for the End key (107) is handled with the MOVE_END message, as it should be. I even wrote my own version of the .kl file and installed & tested it with proper keyboard vendor/product IDs on a rooted Android device, and just confirmed that everything is fine. So, if I join the 107 key code with e.g. "HOME" message instead of "MOVE_END", the End key press on the keyboard switches the device display to the Home screen of the Android launcher as it should.

Also, Home/End keys are working properly in other apps, i.e. in Chrome: jumping on start/end of the HTML page when they are pressed. So the keyboard presses are definitely "reaching" the device. It seems that Kodi does not accept/process "MOVE_HOME"/"MOVE_END" messages, as well as "F1"-"F12".

Logitech K400 is cordless USB keyboard, and I do not see how it can be relevant if it is wired. This should be transparent for the Android device.
Reply
#4
Maybe a debug log of when the end key is pressed to see if anything is being registered by Kodi then.
Reply
#5
(2016-02-04, 20:49)jakejm79 Wrote: Maybe a debug log of when the end key is pressed to see if anything is being registered by Kodi then.

I did it too - turned on Debug Log in Kodi and tried to press End key. No activity recorded in the kodi log file.

Is there anybody out there who can confirm this behavior or test it on own system:
1. Attach physical USB keyboard to your Android device
2. Run Kodi and open some list view (i.e. Movies)
3. Press End key
4. Normally, the view should jump to the end of the list and highlight the last item. But it does not happen on my system Sad
Reply
#6
Anybody...? Sad
Reply
#7
Well, that's it...

I checked the Kodi source code and it seems that Android key codes for handling Home and End keys (AKEYCODE_MOVE_HOME = 122, AKEYCODE_MOVE_END = 123) are not handled in AndroidKey.cpp file as they should. I will raise the question on Feature Request subforum.

Jarvis for Android just extended the keyboard support, so the Function keys F1-F12 are supported now. But still no support for Home/End.
Reply

Logout Mark Read Team Forum Stats Members Help
Home/End/F1-12 Keys on Physical QWERTY Keyboard not passed to Kodi0