HOW-TO:Modify joystick.xml

From Official Kodi Wiki
Jump to navigation Jump to search
Home icon grey.png   ▶ Remote controls
▶ Games
▶ Game controllers ▶ HOW-TO:Modify joystick.xml

Actions in Kodi are defined by Keymaps. If you would like to change the actions for a game controller, you will need to edit your joystick.xml file.

Note: Add-on:Keymap Editor does not work for controllers at this time.

1 General configuration

Controllers are configured in two separate locations:

  • First, you must map your controller in the configuration utility (see HOW-TO:Configure controllers)
  • Optionally, Kodi uses a Keymap named joystick.xml to define Kodi actions for each button

This guide describes how to modify the Keymap.

Note: joystick.xml defines actions for an Xbox 360 controller. See HOW-TO:Map multiple controllers.

2 Location of joystick.xml

The file joystick.xml should be located with Kodi's other keymaps (see Location of keymaps). They keymap placed in the userdata folder will override the keymap shipped with Kodi.

3 Structure

The structure is similar to Kodi's other keymaps:

    <joystick profile="game.controller.default">




4 Planned features

In the future, it will be possible to define actions for holding buttons, similar to Long presses:

      <a holdtime="250">ContextMenu</a>

5 See also