Information What is the difference between Action IDs and Button codes? - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12) +--- Thread: Information What is the difference between Action IDs and Button codes? (/showthread.php?tid=376533) |
What is the difference between Action IDs and Button codes? - 5P004Y32 - 2024-03-06 I'm not entirely sure if this is the right place to post this but seeing as it's related to a feature I'm working on in my skin, I thought this would be ok. Please feel free to move this if it doesn't belong here. I'm working on a feature where the user can map a key/button to trigger a function in my python helper that plays the trailer. The feature itself is working correctly. The key is mapped and then the keymap.xml is modified so that the trailer can be played when pressing the programmed key. That being said, not every key on every remote works. I know that when pressing a key there is an action ID and a button code. But I don't know which one to use because with some keys the action ID works and with others only the button ID will work. Currently I have it set up this way in my helper:
And here's the line that is added into the gen.xml file in the userdata/keymaps folder where the key id is either the action ID or the button code:
My question is what is the difference between the action ID and the button code? Why does it only work sometimes for both? For example, here are three different versions of the same long press action assigned to a button for the play/pause button on an NVIDIA Shield Pro:
The last one with the play_pause mod="longpress" syntax is the only one that works by correctly overriding SHOW_INFO. |