Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Solved Key map
#1
Hi can anyone see why this doesn't work for me?
I want the |<< and >>| buttons on my remote to switch channel groups in the guide.

According to the Wiki this is the |<< and >>| buttons...
Quote:. period Skip forward
, comma Skip backward
The commands to switch channel groups are...
Quote:NextChannelGroup
PreviousChannelGroup
This is what I have in .kodi/userdata/keymaps/epg.xml
Quote:<keymap>
   <tvguide>
      <keyboard>
         <.>NextChannelGroup</.>
         <,>PreviousChannelGroup</,>
      </keyboard>
   </tvguide>
</keymap>

Cheers
Chris
Reply
#2
You need <comma> and <period>, not <,> and <.> (and their mirror closing tags of course).

Try that and see if it works for you.
|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
#3
Further to what Darren wrote, a copy of the default system keymap that comes in Kodi can be found at https://github.com/xbmc/xbmc/blob/master...yboard.xml so that can be used as a guide to check syntax and how keys should be represented.
Reply
#4
(2020-04-24, 09:09)DarrenHill Wrote: You need <comma> and <period>, not <,> and <.> (and their mirror closing tags of course).

Try that and see if it works for you.

Thanks guys.
I got it working with this...
Quote:<keymap>
   <tvguide>
      <keyboard>
         <period>NextChannelGroup</period>
         <comma>PreviousChannelGroup</comma>
      </keyboard>
   </tvguide>
</keymap>
Will this be universal and work on all platforms?

Chris
Reply
#5
It should be yes. Obviously will need a device with a keyboard input, but it should be generic.

Thread marked solved.
|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
#6
(2020-04-24, 15:18)DarrenHill Wrote: It should be yes. Obviously will need a device with a keyboard input, but it should be generic.

Thread marked solved.

Is there a way to remap the action rather than the key? So it would be completely universal
Reply
#7
No, the keymaps are by definition for keys and for other similar inputs.

In some cases even remotes appear to Kodi as keyboards and send their button presses as keystrokes, but for other items they send input actions such as "select" or "playpause" etc corresponding to the relevant button push or whatever.

Have a look at the link below which are all of the default keymaps for the different input methods:

https://github.com/xbmc/xbmc/tree/master/system/keymaps

You can see there how it links the input action to the Kodi action, but you can't universally assign the Kodi action other than by defining each of the different input actions (which can also be default or active window dependent, so the same input can send different action commands depending on which Kodi window has focus).
|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
#8
(2020-04-24, 17:18)DarrenHill Wrote: No, the keymaps are by definition for keys and for other similar inputs.

In some cases even remotes appear to Kodi as keyboards and send their button presses as keystrokes, but for other items they send input actions such as "select" or "playpause" etc corresponding to the relevant button push or whatever.

Have a look at the link below which are all of the default keymaps for the different input methods:

https://github.com/xbmc/xbmc/tree/master/system/keymaps

You can see there how it links the input action to the Kodi action, but you can't universally assign the Kodi action other than by defining each of the different input actions (which can also be default or active window dependent, so the same input can send different action commands depending on which Kodi window has focus).

Right OK.
Looking at those files I think the only ones I need are keyboard and remote.
Should this work?
Quote:<keymap>
    <tvguide>
        <keyboard>
            <period>NextChannelGroup</period>
            <comma>PreviousChannelGroup</comma>
        </keyboard>
        <remote>
            <skipplus>NextChannelGroup</skipplus>
            <skipminus>PreviousChannelGroup</skipminus>
        </remote>
    </tvguide>
</keymap>
Reply
#9
<tvguide> I think should be <TVGuide> (I'm not 100% sure if the keymaps are case sensitive or not) along with it's reciprocal closing tag, but aside from that it looks OK to me.

The keymaps for different inputs (keyboard, remote etc) are fine to merge together into one file. They're only split into separate files in the official repo for clarity.

What happens is the keymaps are loaded in alphabetical order (based on their filename, as long as all are valid xml files), with anything in later loaded maps overwriting duplicate tags in earlier loaded ones. Similarly all the default keymaps are loaded before the user ones, so that the user ones can be used to update and modify the default ones without having to actually change the default files.
|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
Key map0