Ah I see. Seems I chose a bad example for describing the problem. In this case it could of course been an issue with the repeat filter. But also when pressing different buttons such as “1” and “2” consecutively osmc will not switch to channel “12”, but do one action after the other (switch to channel 1 and then switch to channel 2).
See [TESTING] Remote repeat filter changes
There’s some testing ongoing there; but I need more of a consensus to make any further changes.
Cheers
Sam
This whole button mapping is a mystery. Is there some document that describes exactly the flow of data until kodi receives some keypress? And is there any place I can look up the names of the buttons kodi will see so I can add it to my user keymap? I found files like Lircmap.xml and hama_mce.xml but still do not understand the exact mapping.
To give you an example: Since I do not want to use the power button of my remote and the context menu by default is so hard to reach, I tried to map the power button in my user keymap file like this:
<keymap>
<global>
<remote>
<power>ContextMenu</power>
<red>ContextMenu</red>
</remote>
</global>
</keymap>
But it seems it just gets ignored. When I press the power button, I still get the power menu. On libreelec, the exactly same file does what I want (I needed to fiddle with it as libreelec would immediately power down the system when hitting the power button, which was quite an annoyance.
According to the debug logs, I had expected “power” to be the correct name for the button:
18:49:09.493 T:4113231872 DEBUG: Keyboard: scancode: 0x8e, sym: 0x0140, unicode: 0x0000, modifier: 0x0
18:49:09.493 T:4113231872 DEBUG: OnKey: power (0xf0de) pressed, action is ActivateWindow(ShutdownMenu)
18:49:09.493 T:4113231872 DEBUG: Activating window ID: 10111
18:49:09.493 T:4113231872 DEBUG: ------ Window Init (DialogButtonMenu.xml) ------
18:49:09.495 T:4113231872 DEBUG: Keyboard: scancode: 0x8e, sym: 0x0140, unicode: 0x0000, modifier: 0x0
But apparently this is true on libreelec, but false on osmc.
In hama_mce.xml I found the hint that “VolumeDown” maps to “f14”, while on libreelec it is “f9”. This is all quite irritating and I seem to be missing some important mapping (auto repeat not working for the volume keys is another issue right now).
So if somebody can give me a pointer to some documentation that describes how these mappings work, I would be very grateful.
On a PC with regular keyboard this is all more or less trivial and straight forward.
Apparently, at least this is true. Just for fun I just modified this mapping directly in /usr/share/kodi/system/keymaps/keyboard.xml and now it works as desired
So does this mean the keymap in /home/osmc/.kodi/userdata/keymaps indeed is ignored by osmc?
Reason here was that I added the mappings to the remote section. But this specific remote is treated as keyboard by kodi, so my changes did not have any effect. After adding it to the keyboard section, I could map all the keys as desired in the user keymap file. Just in case anyone else also runs into this issue…
After reading and trying lots of things, I can only confirm this! I finally found some document explaining this in detail and there are so many layers I finally understand that there are even differences between the various systems (even kernel versions can make a difference here).
Some buttons simply are problematic and I’m now more or less avoiding them. But I got the green start-button to work by using the keycode instead of keyname and now everything is fine for me regarding button mapping. It’s just a bit awkward that kodi will print the key codes in hexadecimal in its debug log while it expects them in decimal in its configuration files. At least this is properly documented