Jump to content

Kodi/keymaps

From MattWiki

Keymaps are XML base files that define the mappings of keys (keyboard keys, mouse/remote/joysticks buttons and more) to Kodi actions.

Introduction[edit | edit source]

All the keypresses that Kodi responds to, for example "P" for "play" and "X" for "stop" are configured in a file called keyboard.xml. Actually there are two keyboard.xml files. There is the system keyboard.xml that contains all the standard key mappings, and each user optionally has their own userdata keyboard.xml that contains just their customised key mappings.

The userdata keyboard.xml only needs to contain additional key mappings, or key mappings that override the defaults in the system keyboard.xml. When Kodi is trying to decide how to respond to a keypress it first looks in the userdata keyboard.xml. If it doesn't find a mapping for the keypress Kodi then looks in the system keyboard.xml. This means that the userdata keyboard.xml is typically quite short because it only needs to define mappings for a few keys.

You can change key mappings by editing the system keyboard.xml, but we strongly recommend you don't do this. The system keyboard.xml is a big complicated file, and if you introduce an error into it you can break all the key mappings. Also any changes you make risk being overwritten if you upgrade Kodi. In general you should only ever edit your userdata keyboard.xml. Even if you make a horrendous hash of this you just need to delete or rename your userdata keyboard.xml to restore the default key mappings.

User keymaps are only processed when Kodi starts up, therfore you must restart Kodi to see any changes.

Add-on:Keymap Editor[edit | edit source]

Keymap Editor is a GUI for configuring mappings for remotes, keyboard and other inputs supported by Kodi.

Installing[edit | edit source]

This add-on is installed from the Add-on browser located in Kodi as follows:

  1. Settings
  2. Add-ons
  3. Install from repository
  4. Program Add-ons
  5. Keymap Editor
  6. Install

Set the Back button to Stop a full screen video[edit | edit source]

Stop Playback with the Back button on Kodi while in full screen vdeo (disable background video playback):

Add-ons Install from RepositoryKodi Add-on Repository Program add-ons Keymap Editor Install Keymap Editor Run Edit Fullscreen Video Playback Stop - browser_back Edit key Press the BACK button on your remote until you see the Save option.

<keymap><fullscreenvideo><keyboard><key id="61448">stop</key></keyboard></fullscreenvideo></keymap>