Editing keymaps within an addon - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111) +---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228) +---- Thread: Editing keymaps within an addon (/showthread.php?tid=357221) |
Editing keymaps within an addon - CluelessDev - 2020-09-22 I'm using Plex app on Kodi and I've been trying to customize a function of few keys when Plex is open. I discovered and read the wiki entries about keymapping and I want to change 2 keys while the video within Plex is playing (one for SubtitleDelayMinus other for SubtitleDelayPlus). If I add the entries in remote.xml under the global section then it's working fine but could I make this change only within the specific addon? Would I be able to do something like this and if yes what would the name of the section be?
RE: Editing keymaps within an addon - DarrenHill - 2020-09-22 You won't be able to do it that way, certainly not by making up tags like <Plex></Plex>. Those kind of tags are only for being more specific by input type (mouse, keyboard, remote etc as used in the default keymaps as examples) and by window type (full screen video, video menu, my files etc - see the page on window IDs (wiki) for more details) as detailed in the keymaps (wiki) pages that you already found on the wiki and the other pages/links from them. The only way I can see that you might do this is a separate service addon that watches for the Plex addon to open, and have that inject the key remapping, and then also watch for the Plex addon closing and undo the keymap change again. That would probably work, but may well be a non-trivial exercise to write (it would be beyond my capabilities, so I can't be more specific). But there is no inbuilt way of doing it, at least to my knowledge. |