Finally I got it to work. Thanks to this blog-post I found out that the joypad's d-pad is actually reacting on this line:
Code:
<hat id="1" direction="left">Left</hat>
Hence the joystick-part in Keymap.xml has to look something like this:
Code:
<keymap>
<global>
<joystick name="Mega World USB Game Controllers">
<axis id="1" limit="-1">Left</axis> <!-- Left analogue-stick turning left (giving negative numbers) -->
<axis id="1" limit="1">Right</axis> <!-- Left analogue-stick turning right (returning positive numbers) -->
<axis id="2" limit="-1">Up</axis> <!-- Left analogue-stick turning up (giving negative numbers) -->
<axis id="2" limit="1">Down</axis> <!-- Left analogue-stick turning down (giving positive numbers) -->
<hat id="1" direction="left">Left</hat>
<hat id="1" direction="right">Right</hat>
<hat id="1" direction="up">Up</hat>
<hat id="1" direction="down">Down</hat>
<button id="1">Back</button>
<button id="3">Select</button>
</joystick>
</global>
</keymap>
Important thing for the axis-stuff is the id. JStest is giving wrong ids. I had to increase all numbers by one because jstest begins to count with 0 and not with 1. Every axis-id is for two directions (Left+Right or Up+Down). E.G. Id1 in my case is for left and right of the first analogue-stick (jstest is calling it Id0). ID0 doesn't exist in xbmc.
Also important: The hat-id doesn't change with directions and is just always 1 in my case. Instead of numbers xbmc's keymap.xml is really getting the commands up, down left and right, which are not reported by jstest.
So yes, it is possible to use a standard-joystick.
Hope this will help somebody. I'm dissapointed nobody did help me here.
Bookmarks