Kodi Community Forum
Solved Isn't keyboard.xml supposed to override the default keymaps? - 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: Windows (https://forum.kodi.tv/forumdisplay.php?fid=59)
+---- Thread: Solved Isn't keyboard.xml supposed to override the default keymaps? (/showthread.php?tid=255026)



Isn't keyboard.xml supposed to override the default keymaps? - ioncype - 2016-01-05

edit: Nm. Apparently I have to add it within <FullscreenVideo> tags too. I'll just use the function keys instead.

Am I missunderstanding this line from the wiki?:
Quote:Keymaps defined in the userdata folder add to or override mappings in the global keymap.

E.g. I set key A to open Favourites. It only works when not playing a video, during video playback "Audio delay control" opens instead. Shouldn't the A key be completely overridden?

<keymap>
<global>
<keyboard>
<a>ActivateWindow(favourites)</a>
</keyboard>
</global>
</keymap>


RE: Isn't keyboard.xml supposed to override the default keymaps? - DarrenHill - 2016-01-05

Not quite, at least to my understanding.

Global is for when you're in the main Kodi display, but you can also define keymaps independently for specific Kodi windows (for example home in the wiki keymap (wiki) example). Global isn't "everything", but more the overall app rather than any specific window.

So you'd probably need to add a second entry for the video window to redefine the key there. It's to allow different windows to have different actions for a specific key. You can find a list of the Window IDs (wiki) on the wiki as well.

It's most simply done with the keymap editor add-on (Add-on:Keymap_Editor (wiki)).


RE: Isn't keyboard.xml supposed to override the default keymaps? - trogggy - 2016-01-05

It does override. That's why it's working for you when not playing something.
Unfortunately <global> doesn't override other settings, so you need to add the same thing for <fullscreenvideo> - and anywhere else key A appears in the default keymap.