Kodi Community Forum

Full Version: Support for custom keymaps in v17?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I still haven't upgraded from 16 to 17, because 17 does not recognize my custom keymap via keyboard.xml. Does anyone know if there is a different method for using a custom keymap in 17? Everything I can find about it in the wiki relates to v16.
Should still be the same
(2017-12-01, 20:19)Martijn Wrote: [ -> ]Should still be the same
 It's not. Keyboard.xml is not recognized. All buttons revert to default on 17. I think I even recall seeing somewhere that keyboard.xml was not compatible with 17.
(2017-12-01, 21:10)sumsh Wrote: [ -> ]
(2017-12-01, 20:19)Martijn Wrote: [ -> ]Should still be the same
 It's not. Keyboard.xml is not recognized. All buttons revert to default on 17. I think I even recall seeing somewhere that keyboard.xml was not compatible with 17. 
I use a keyboard.xml with v17.  Works fine.  There were some changes between 16 and 17, or maybe there's another problem with your file.  Debug log would show whether the file's being read; posting the file here wouldn't hurt.
(2017-12-01, 21:21)trogggy Wrote: [ -> ]
(2017-12-01, 21:10)sumsh Wrote: [ -> ]
(2017-12-01, 20:19)Martijn Wrote: [ -> ]Should still be the same
 It's not. Keyboard.xml is not recognized. All buttons revert to default on 17. I think I even recall seeing somewhere that keyboard.xml was not compatible with 17.  
I use a keyboard.xml with v17.  Works fine.  There were some changes between 16 and 17, or maybe there's another problem with your file.  Debug log would show whether the file's being read; posting the file here wouldn't hurt. 
Thanks for your help. Here's my keyboard.xml. The main thing I want to preserve is the longpress commands.

<?xml version="1.0" encoding="UTF-8"?>
<keymap>
  <Global>
    <keyboard>
      <rewind>PageUp</rewind>
      <fastforward>PageDown</fastforward>
    </keyboard>
  </Global>
  <Home>
    <keyboard>
      <menu>XBMC.ActivateWindow(Favourites)</menu>
    </keyboard>
  </Home>
  <FullscreenVideo>
    <keyboard>
      <menu>ShowSubtitles</menu>
      <backspace>Stop</backspace>
      <browser_back>Stop</browser_back>
      <rewind>Rewind</rewind>
      <fastforward>FastForward</fastforward>
    </keyboard>
  </FullscreenVideo>
  <VideoOSD>
    <keyboard>
      <menu>CodecInfo</menu>
    </keyboard>
  </VideoOSD>
  <MyFiles>
    <keyboard>
      <play_pause>Highlight</play_pause>
    </keyboard>
  </MyFiles>
  <MyVideoLibrary>
    <keyboard>
      <menu mod="longpress">Delete</menu>
    </keyboard>
  </MyVideoLibrary>
  <MyVideoFiles>
    <keyboard>
      <menu mod="longpress">Delete</menu>
    </keyboard>
  </MyVideoFiles>
  <virtualkeyboard>
    <keyboard>
      <menu>shift</menu>
      <play_pause>enter</play_pause>
      <rewind>backspace</rewind>
      <fastforward>number0</fastforward>
      <browser_back>PreviousMenu</browser_back>
      <backspace>PreviousMenu</backspace>
    </keyboard>
  </virtualkeyboard>
  <Visualisation>
    <keyboard>
      <browser_back>Fullscreen</browser_back>
    </keyboard>
  </Visualisation>
  <Favourites>
    <keyboard>
      <browser_back>close</browser_back>
    </keyboard>
  </Favourites>
  <NumericInput>
    <keyboard>
      <browser_back>Close</browser_back>
    </keyboard>
  </NumericInput>
  <PVROSDChannels>
    <keyboard>
      <browser_back>Close</browser_back>
    </keyboard>
  </PVROSDChannels>
  <PVROSDGuide>
    <keyboard>
      <browser_back>Close</browser_back>
    </keyboard>
  </PVROSDGuide>
  <PVROSDDirector>
    <keyboard>
      <browser_back>Close</browser_back>
    </keyboard>
  </PVROSDDirector>
  <PVROSDCutter>
    <keyboard>
      <browser_back>Close</browser_back>
    </keyboard>
  </PVROSDCutter>
  <MyTVSettings>
    <keyboard>
      <browser_back>PreviousMenu</browser_back>
    </keyboard>
  </MyTVSettings>
</keymap>
Sticking that in kodi and running gives the following in a debug log:
Quote:00:54:47.163 T:7400   ERROR: Window Translator: Can't find window files
00:54:47.163 T:7400   ERROR: Window Translator: Can't find window videolibrary
00:54:47.163 T:7400   ERROR: Window Translator: Can't find window videofiles
00:54:47.163 T:7400   ERROR: Window Translator: Can't find window pvrosddirector
00:54:47.163 T:7400   ERROR: Window Translator: Can't find window pvrosdcutter
00:54:47.163 T:7400   ERROR: Window Translator: Can't find window tvsettings
As above, there were changes between 16 and 17.  You need to adapt your keymap to fit those.
Krypton's default keyboard.xml is here.  Looking at that would be a good starting point to fix yours - it should be fairly straightforward once you figure out the category changes (and they're no doubt detailed somewhere but it's a long time since I had to do this).
(2017-12-02, 02:09)trogggy Wrote: [ -> ]Sticking that in kodi and running gives the following in a debug log:
Quote:00:54:47.163 T:7400   ERROR: Window Translator: Can't find window files
00:54:47.163 T:7400   ERROR: Window Translator: Can't find window videolibrary
00:54:47.163 T:7400   ERROR: Window Translator: Can't find window videofiles
00:54:47.163 T:7400   ERROR: Window Translator: Can't find window pvrosddirector
00:54:47.163 T:7400   ERROR: Window Translator: Can't find window pvrosdcutter
00:54:47.163 T:7400   ERROR: Window Translator: Can't find window tvsettings
As above, there were changes between 16 and 17.  You need to adapt your keymap to fit those.
Krypton's default keyboard.xml is here.  Looking at that would be a good starting point to fix yours - it should be fairly straightforward once you figure out the category changes (and they're no doubt detailed somewhere but it's a long time since I had to do this). 

Thank you for this. I was able to adjust my file and it works as expected now. Much appreciated!
Glad to help.