2014-04-04, 15:03
Hi everyone,
I've been wracking my brain trying to get my two Xbox Controller S gamepads to work within XBMC, and have read tons of articles and nothing seems to indicate what my issue is. Hoping someone here can help me. Essentially only a couple of buttons or axis do anything, and what they do is not entirely helpful.
I started by doing the obvious. I plugged my controllers in and confirmed they were working fine within a game. All good. I then fired up XBMC thinking it would just work with my controllers, however it seems only a couple of my buttons and axis are mapped. If I press the front left trigger, it causes my menu to scroll like crazy. If I push one of my sticks in various directions it lowers the volume. I think one of my 4 coloured buttons may work as a back button. Apart from that, nothing else works.
So I did some research and found this article - http://lektiondestages.blogspot.com.au/2...-xbmc.html - I did everything it said, grabbed the name of my 2 Xbox controllers and created an xml in the keymap directory, then spent a little time mapping the buttons and axis to the XBMC actions by using jstest and the XBMC keymap wiki. My resulting xml file looks like this for my US controller:
<keymap>
<global>
<joystick name="Microsoft X-Box pad v2 (US)">
<button id="1">Back</button>
<button id="0">Select</button>
<button id="3">Info</button>
<button id="4">FullScreen</button>
<button id="7">Play</button>
<button id="6">Pause</button>
<axis id="6" limit="-32767">Left</axis>
<axis id="6" limit="+32767">Right</axis>
<axis id="7" limit="-32767">Up</axis>
<axis id="7" limit="+32767">Down</axis>
<axis id="5" limit="+1">SkipNext</axis>
<axis id="2" limit="+1">SkipPrevious</axis>
<axis id="0" limit="+10000">VolumeUp</axis>
<axis id="0" limit="-10000">VolumeDown</axis>
<axis id="1" limit="-10000">VolumeUp</axis>
<axis id="1" limit="+10000">VolumeDown</axis>
</joystick>
</global>
</keymap>
However then firing up XBMC I found this had no effect whatsoever. It was as though the xml I created wasn't there, or was in some way being over-ruled by some kind of default.
So from here I read up on the keyboard.xml and joystick.xml files. I couldn't find them in my install, and read that this was apparently by design as apparently you only need them present if you wish to edit them to over-ride the system defaults. Is this correct? I then found on Github (https://github.com/xbmc/xbmc/tree/master/system/keymaps) the default versions for keyboard.xml and joystick.xml and dumped them into my userdata/keymap directory. I tried modifying the file to see if I could use it to over-ride the system defaults. However firing up XBMC again afterwards showed, you guessed it, no effect.
I then thought to check the XBMC log (cat ~/.xbmc/temp/xbmc.log | grep Joystick) and it returned the following:
23:22:55 T:139961155270592 NOTICE: No Joystick name specified, loading default map
23:22:55 T:139961155270592 NOTICE: No Joystick name specified, loading default map
23:22:55 T:139961155270592 NOTICE: No Joystick name specified, loading default map
23:22:55 T:139961155270592 NOTICE: No Joystick name specified, loading default map
23:22:56 T:139961155270592 NOTICE: Enabled Joystick: Microsoft X-Box pad v2 (US)
23:22:56 T:139961155270592 NOTICE: Enabled Joystick: Microsoft X-Box pad (Japan)
My 2 controllers are in fact a US and a Japanese model, so this is exactly what I would expect it to see. These are also the exact device names I used earlier when creating my own keymap files.
When this failed to return any results I then noticed again on Github (https://github.com/xbmc/xbmc/tree/master/system/keymaps) that there was a list of default gamepad keymap files for my exact controller type, Xbox Controller S, was specifically listed! But downloading it and placing it in the userdata/keymap directory again yielded no results.
I read somewhere that XBMC chooses configurations on a first come first served basis, in that if one file references a device, button or axis then it over-rides any others that are loaded after that. Is this true?
If anyone can shed any light on this it would be greatly appreciated.
Thanks.
I've been wracking my brain trying to get my two Xbox Controller S gamepads to work within XBMC, and have read tons of articles and nothing seems to indicate what my issue is. Hoping someone here can help me. Essentially only a couple of buttons or axis do anything, and what they do is not entirely helpful.
I started by doing the obvious. I plugged my controllers in and confirmed they were working fine within a game. All good. I then fired up XBMC thinking it would just work with my controllers, however it seems only a couple of my buttons and axis are mapped. If I press the front left trigger, it causes my menu to scroll like crazy. If I push one of my sticks in various directions it lowers the volume. I think one of my 4 coloured buttons may work as a back button. Apart from that, nothing else works.
So I did some research and found this article - http://lektiondestages.blogspot.com.au/2...-xbmc.html - I did everything it said, grabbed the name of my 2 Xbox controllers and created an xml in the keymap directory, then spent a little time mapping the buttons and axis to the XBMC actions by using jstest and the XBMC keymap wiki. My resulting xml file looks like this for my US controller:
<keymap>
<global>
<joystick name="Microsoft X-Box pad v2 (US)">
<button id="1">Back</button>
<button id="0">Select</button>
<button id="3">Info</button>
<button id="4">FullScreen</button>
<button id="7">Play</button>
<button id="6">Pause</button>
<axis id="6" limit="-32767">Left</axis>
<axis id="6" limit="+32767">Right</axis>
<axis id="7" limit="-32767">Up</axis>
<axis id="7" limit="+32767">Down</axis>
<axis id="5" limit="+1">SkipNext</axis>
<axis id="2" limit="+1">SkipPrevious</axis>
<axis id="0" limit="+10000">VolumeUp</axis>
<axis id="0" limit="-10000">VolumeDown</axis>
<axis id="1" limit="-10000">VolumeUp</axis>
<axis id="1" limit="+10000">VolumeDown</axis>
</joystick>
</global>
</keymap>
However then firing up XBMC I found this had no effect whatsoever. It was as though the xml I created wasn't there, or was in some way being over-ruled by some kind of default.
So from here I read up on the keyboard.xml and joystick.xml files. I couldn't find them in my install, and read that this was apparently by design as apparently you only need them present if you wish to edit them to over-ride the system defaults. Is this correct? I then found on Github (https://github.com/xbmc/xbmc/tree/master/system/keymaps) the default versions for keyboard.xml and joystick.xml and dumped them into my userdata/keymap directory. I tried modifying the file to see if I could use it to over-ride the system defaults. However firing up XBMC again afterwards showed, you guessed it, no effect.
I then thought to check the XBMC log (cat ~/.xbmc/temp/xbmc.log | grep Joystick) and it returned the following:
23:22:55 T:139961155270592 NOTICE: No Joystick name specified, loading default map
23:22:55 T:139961155270592 NOTICE: No Joystick name specified, loading default map
23:22:55 T:139961155270592 NOTICE: No Joystick name specified, loading default map
23:22:55 T:139961155270592 NOTICE: No Joystick name specified, loading default map
23:22:56 T:139961155270592 NOTICE: Enabled Joystick: Microsoft X-Box pad v2 (US)
23:22:56 T:139961155270592 NOTICE: Enabled Joystick: Microsoft X-Box pad (Japan)
My 2 controllers are in fact a US and a Japanese model, so this is exactly what I would expect it to see. These are also the exact device names I used earlier when creating my own keymap files.
When this failed to return any results I then noticed again on Github (https://github.com/xbmc/xbmc/tree/master/system/keymaps) that there was a list of default gamepad keymap files for my exact controller type, Xbox Controller S, was specifically listed! But downloading it and placing it in the userdata/keymap directory again yielded no results.
I read somewhere that XBMC chooses configurations on a first come first served basis, in that if one file references a device, button or axis then it over-rides any others that are loaded after that. Is this true?
If anyone can shed any light on this it would be greatly appreciated.
Thanks.