Kodi has controller profiles for each systems it supports. Add-ons consist of several files:
-
addon.xml - the add-on fluff
-
layout.png - the picture shown in the configuration GUI
-
mask.png - optional, the button mask of layout.png
-
icon.png - the thumbnail used in the GUI
-
layout.xml - the button layout
-
strings.po - The names of the buttons
This schema is described by Kodi's add-on system. It includes:
- Controller ID (identical to add-on ID)
- Metadata version
- Controller name
- Internationalized controller name
- Internationalized 2-3 sentence description including release year
- Path to icon.png
- Path to layout.xml
- Image credit
Metadata version uses semantic versioning (MAJOR.MINOR.PATCH). Increment the:
- MAJOR version when you make incompatible schema changes
- MINOR version when you make schema changes in a backwards-compatible manner, and
- PATCH version when you make data changes.
Transparent image of the controller. Recommended size 1024x1024.
Unused currently. Same dimensions as layout.png.
Possible use of this is to generate a costmap for automatic line placement.
Opaque image of the controller. This should be the transparent image against background.png in the textures folder. Recommended size 512x512 as per Kodi add-on rules.
This file describes the button layout. The root <layout> tag contains the following attributes:
- Path to layout.png
- Path to mask.png
The button layout is given by <category> tags. Categories are groups for buttons shown in the controller mapping window. Categories have the following attributes defined in categories.po:
- Category name
- Internationalized name
- Category description
- Kodi string ID
Categories contain a list of features. Each feature has the following attributes:
- Feature name
- Internationalized name
- Feature type
- Input type (analog or digital, defaults to analog)
The following feature types are available:
buttonanalogstickaccelerometermotorrelpointerabspointerwheelthrottlekey
Buttons must provide a type attribute to specify analog or digital input.
Keys must provide a symbol attribute to facilitate keyboard mapping. Symbols are hardware-independent virtual key representations. The following symbols are used:
| Symbol | Character | ASCII value |
|---|---|---|
| backspace | 8 | |
| tab | 9 | |
| clear | 12 | |
| return | 13 | |
| pause | 19 | |
| escape | 27 | |
| space | 32 | |
| exclaim | ! | 33 |
| doublequote | " | 34 |
| hash | # | 35 |
| dollar | $ | 36 |
| ampersand | & | 38 |
| quote | ' | 39 |
| leftparen | ( | 40 |
| rightparen | ) | 41 |
| asterisk | * | 42 |
| plus | + | 43 |
| comma | , | 44 |
| minus | - | 45 |
| period | . | 46 |
| slash | / | 47 |
| 0 | 0 | 48 |
| 1 | 1 | 49 |
| 2 | 2 | 50 |
| 3 | 3 | 51 |
| 4 | 4 | 52 |
| 5 | 5 | 53 |
| 6 | 6 | 54 |
| 7 | 7 | 55 |
| 8 | 8 | 56 |
| 9 | 9 | 57 |
| colon | : | 58 |
| semicolon | ; | 59 |
| less | < | 60 |
| equals | = | 61 |
| greater | > | 62 |
| question | ? | 63 |
| at | @ | 64 |
| leftbracket | [ | 91 |
| backslash | \ | 92 |
| rightbracket | ] | 93 |
| caret | ^ | 94 |
| underscore | _ | 95 |
| grave | ` | 96 |
| a | a | 97 |
| b | b | 98 |
| c | c | 99 |
| d | d | 100 |
| e | e | 101 |
| f | f | 102 |
| g | g | 103 |
| h | h | 104 |
| i | i | 105 |
| j | j | 106 |
| k | k | 107 |
| l | l | 108 |
| m | m | 109 |
| n | n | 110 |
| o | o | 111 |
| p | p | 112 |
| q | q | 113 |
| r | r | 114 |
| s | s | 115 |
| t | t | 116 |
| u | u | 117 |
| v | v | 118 |
| w | w | 119 |
| x | x | 120 |
| y | y | 121 |
| z | z | 122 |
| leftbrace | [ | 123 |
| bar | | | 124 |
| rightbrace | ] | 125 |
| tilde | ~ | 126 |
| delete | 127 |
| Symbol | Comment |
|---|---|
| kp0 | Numpad 0 |
| kp1 | Numpad 1 |
| kp2 | Numpad 2 |
| kp3 | Numpad 3 |
| kp4 | Numpad 4 |
| kp5 | Numpad 5 |
| kp6 | Numpad 6 |
| kp7 | Numpad 7 |
| kp8 | Numpad 8 |
| kp9 | Numpad 9 |
| kpperiod | Numpad . |
| kpdivide | Numpad / |
| kpmultiply | Numpad * |
| kpminus | Numpad - |
| kpplus | Numpad + |
| kpenter | Numpad Enter |
| kpequals | Numpad = |
| up | |
| down | |
| right | |
| left | |
| insert | |
| home | |
| end | |
| pageup | |
| pagedown | |
| f1 | |
| f2 | |
| f3 | |
| f4 | |
| f5 | |
| f6 | |
| f7 | |
| f8 | |
| f9 | |
| f10 | |
| f11 | |
| f12 | |
| f13 | |
| f14 | |
| f15 | |
| numlock | |
| capslock | |
| scrollock | |
| leftshift | |
| rightshift | |
| leftctrl | |
| rightctrl | |
| leftalt | |
| rightalt | |
| leftmeta | |
| rightmeta | |
| leftsuper | Left "Windows" key |
| rightsuper | Right "Windows" key |
| mode | "Alt Gr" key |
| compose | Multi-key compose key |
| help | |
| sysreq | |
| break | |
| menu | |
| power | Power Macintosh power key |
| euro | Some European keyboards |
| undo | Atari keyboard has Undo |
This file contains the internationalized versions of the translatable strings above. Its format is described by Kodi's translation system.