Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Editing keymaps within an addon
#1
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?
xml:

<keymap>
  <Plex>
    <remote>
      <four>SubtitleDelayMinus</four>
      <six>SubtitleDelayPlus</six>
    </remote>
  </Plex>
</keymap>
Reply
#2
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.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply

Logout Mark Read Team Forum Stats Members Help
Editing keymaps within an addon0