Xbox wired controller, erratic trigger behavior
#1
I am trying to hook my xbox 360 wired controller up to my HTPC machine, and I've mapped all the buttons/axes/hat in my keymap.xml, but the left trigger (axis 3) and right trigger (axis 6) are causing problems. Looking at the triggers in jstest-gtk shows that the triggers idle at -32768, and when pressed will increase until hitting 32768. So I'm guessing what happens in XBMC is they are assumed to be at zero, and the first time i press one (which works, only the first time) it goes to 32768, then repeatedly sends -32768 as the value. I have no idea if this is correct, but the button works exactly once, then nothing.

The global section of my keymap file looks like this:

Code:
<global>
    <joystick name="Microsoft X-Box 360 pad">
        <hat id="1" position="up">Up</hat>
        <hat id="1" position="right">Right</hat>
        <hat id="1" position="down">Down</hat>
        <hat id="1" position="left">Left</hat>

        <button id="1">Select</button> <!--A -->
        <button id="2">ParentDir</button> <!--B -->
        <button id="3">FullScreen</button> <!--X -->
        <button id="4">Queue</button> <!--Y -->
        <button id="5">ContextMenu</button> <!--LB -->
        <button id="6"></button> <!--RB -->
        <button id="7">PreviousMenu</button> <!--Back -->
        <button id="8">XBMC.ActivateWindow(PlayerControls)</button> <!--Start -->
        <button id="9">XBMC.ActivateWindow(Home)</button> <!--Menu -->
        <button id="10">XBMC.ActivateWindow(ShutdownMenu)</button> <!--LStick -->
        <button id="11">Screenshot</button> <!--RStick -->
      
        <axis id="1" limit="-1">ScrollDown</axis> <!--LS left -->
        <axis id="1" limit="+1">ScrollUp</axis> <!--LS right -->
        <axis id="2" limit="-1">Up</axis> <!--LS up -->
        <axis id="2" limit="+1">Down</axis> <!--LS down -->
        <axis id="3" limit="-1">AnalogSeekBack</axis> <!-- LT -->
        <axis id="3" limit="+1">AnalogSeekBack</axis> <!-- LT -->
        <axis id="4" limit="-1">AnalogSeekBack</axis> <!--RS left -->
        <axis id="4" limit="+1">AnalogSeekForward</axis> <!--RT right -->
        <axis id="5" limit="-1">VolumeDown</axis> <!-- RS up -->
        <axis id="5" limit="+1">VolumeUp</axis> <!-- RS down -->
        <axis id="6" limit="-1">AnalogSeekForward</axis> <!-- RT -->
        <axis id="6" limit="+1">AnalogSeekForward</axis> <!-- RT -->
      
    </joystick>
  </global>

So really, my question is:

What does the 'limit' parameter on the axis actually mean? I've searched for assistance on this issue, and have found numerous configurations which supposedly result in working triggers, but they seem to be for alternate versions of the controller, which either use 'button' definitions for the trigger, or have different axis ids. Regardless, I've tried every solution I could find and none of them work. And nowhere could I actually find documentation on what that axis parameter does.

I want to have axis 3 and axis 6 ignore all events below 0, and only register an action when that threshold is broken, due to the triggers constantly registering as -32768.
Reply

Logout Mark Read Team Forum Stats Members Help
Xbox wired controller, erratic trigger behavior0