Kodi Community Forum
How-to use keymap.xml - 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: How-to use keymap.xml (/showthread.php?tid=12383)



- CraiZE - 2005-05-21

hello,

i was today trying to get xbmc to have my remote use "2" for volume up, "5" for volume down, and "8" for mute. the mute, being a very good reasoning if you get a phone call or whatever, but the way keymap.xml works, was somehow changed (or just not buggy). so since i've recieved some help from jmarshall over irc, i will be here explaining you how things work.

basics

Quote:<global> & </global>

first off, everything in the global are global keys. xbmc falls back to the assigned action you defined here if there is none to be found in a specific window.

Quote:<window>

windows specify seperate "windows", these can be all sort of window's, and usually a "<description>" follows, which tells you which window it is.

in these windows you will see seperate bindings, these have #1 priority, so if you got for example in:

Quote:<window>
<description>fullscreen video</description>

   <action>
     <description>remote button 1</description>
     <id>59</id>
     <remote>1</remote>
     <keyboard>1</keyboard>
   </action>

you see remote button 1, if you delete that <action> entry, you will make it use remote button 1 from the globals. simple as that.

and i believe that should explain it. so for instance (only with remote button 2) where i wanted volume up, i remove the remote button 2 in the fullscreen <window>, and in globals,

Quote:    <action>
     <description>volume up</description>
     <id>88</id>
     <gamepad>rightthumbstickup</gamepad>
     <remote>volumeplus</remote>
     <keyboard>+</keyboard>
     <remote>2</remote>
   </action>

as you can see my <remote>2</remote> been added, so now, i can use the 2nd button to volume up, in the ui or while playing back videos in fullscreen.

and for those who are lazy, http://ttdev.net/xkme/index.html
has a keymap.xml editor, but beware, use it at your own risk.

(i experienced it crashing when wanting to edit the music stuff).

have fun!