[Windows]Setup XBox Controller with keymap.xml
After a little bit of struggling and information gathering, I finally figured out how to use the "keymap.xml" to use my Xbox 360-Controller without the need of an event-client.

If your controller does not work or/and you are using XBCD for your controller, you have to check the correct button-assignments which are used by SDL.
Start XBMC, enable debug-logging, and press the buttons you want to use. Remember the order and consult your debug.log, the button-presses should be shown in there.

The Button-Layout is the following:
Button id 1 = A
Button id 2 = B
Button id 3 = X
Button id 4 = Y
Button id 5 = Left Shoulder Button
Button id 6 = Right Shoulder Button
Button id 7 = back
Button id 8 = start
Button id 9 = left stick button
Button id 10 = right stick button

axis limit="-1" id="1"   Left on left stick
axis limit="+1" id="1"   Right on left stick
axis limit="-1" id="2"   Up on left stick
axis limit="+1" id="2"   Down on left stick

axis limit="-1" id="3"   LeftTrigger
axis limit="+1" id="3"   RightTrigger

axis limit="-1" id="4"   Up on right stick
axis limit="+1" id="4"   Down on right stick
axis limit="-1" id="5"   Left on right stick
axis limit="+1" id="5"   Right on right stick

hat id="1" position="up"   Up on DPAD
hat id="1" position="right"   Right on DPAD
hat id="1" position="down"   Down on DPAD
hat id="1" position="left"   Left on DPAD

Simple steps to create your own keymap.xml:
1. Navigate to xbmc_root/system/keymaps

2. Use either an existing XML-File for editing (I would suggest "joystick.Microsoft.Xbox.360.Controller.xml") or create a new one

3. Navigate to XBMC's Data-Folder* and open the logfile "xbmc"

4. If your controller was connected the last time you ran XBMC, you will see an entry that reads like
NOTICE: Enabled Joystick: XBOX 360 For Windows (Controller)
NOTICE: Details: Total Axis: 5 Total Hats: 1 Total Buttons: 10
Use the line which is right behinde "Enabled Joystick" for the name of the joystick.

5. Create/Change the nodes for your needs. Check the Wiki for Instructions (more below).

6. Done, you should be up and running! (Note: You must restart the XBMC in order to apply the changes you made)

* = mostly "C:\Users\YourName\AppData\Roaming\XBMC" - note that the folder "AppData" is hidden

Good to know:
Here is a list of actions you can use:

The full list of actions is here:

Look at the part below "static const ActionMapping actions[] =" .
On the left side you find the name to use for the action, on the right side the action which is executed.

You can also run XBMC's internal commands, just put "XBMC." before function (XBMC.Function). A list of commands is here:

And a list of available windows:

You can find my example key-file with mappings here:
Thread Rating:
  • 1 Vote(s) - 5 Average

Messages In This Thread
[Windows]Setup XBox Controller with keymap.xml - by HenryFord - 2011-01-05, 11:17
[No subject] - by bluenote - 2011-01-10, 06:45
[No subject] - by HenryFord - 2011-01-10, 18:34
[No subject] - by agentbad - 2011-01-30, 03:29
[No subject] - by HenryFord - 2011-02-23, 18:15
[No subject] - by publicENEMY - 2011-03-16, 13:40
[No subject] - by HenryFord - 2011-03-18, 18:49
[No subject] - by pathw - 2011-03-19, 22:50
[No subject] - by Rodimus - 2011-03-20, 21:56
[No subject] - by HenryFord - 2011-03-22, 16:58
[No subject] - by pathw - 2011-03-22, 21:33
[No subject] - by HenryFord - 2011-03-23, 09:02
[No subject] - by teeedubb - 2011-04-12, 12:02

Logout Mark Read Team Forum Stats Members Help
[Windows]Setup XBox Controller with keymap.xml51