configuring a playstation1 controller
#1
hey,

I'm having trouble configuring a psx controller to navigate in xbmc. I created a file ~/.xbmc/userdata/keymaps/psx-controller.xml containing :
Code:
<keymap>
        <global>
                <joystick name="Dual USB Vibration Joystick">
                        <button id="3">Select</button>
                        <button id="2">ParentDir</button>
                        <button id="1">Queue</button>
                        <button id="4">FullScreen</button>
                        <button id="8">ContextMenu</button>
                        <button id="9">PreviousMenu</button>
                        <button id="12">XBMC.ActivateWindow(ShutdownMenu)</button>
                        <button id="10">XBMC.ActivateWindow(PlayerControls)</button>
                        <axis id="2" limit="+1">VolumeDown</axis>
                        <axis id="2" limit="-1">VolumeUp</axis>
                        <axis id="4" limit="+1">AnalogSeekForward</axis>
                        <axis id="4" limit="-1">AnalogSeekBack</axis>
                        <axis id="5" limit="-1">Left</axis>
                        <axis id="5" limit="1">Right</axis>
                        <axis id="6" limit="-1">Up</axis>
                        <axis id="6" limit="1">Down</axis>
                </joystick>
        </global>
</keymap>
(buttons and axis copied from http://forum.xbmc.org/archive/index.php/t-34608.html)

the controllers (there is two) are recognize:
Quote:$ cat xbmc.log | grep -i USB
22:22:48 T:3019474736 M:340013056 NOTICE: Enabled Joystick: Dual USB Vibration Joystick
22:22:48 T:3019474736 M:340025344 NOTICE: Enabled Joystick: Dual USB Vibration Joystick

the psx-controller.xml is loaded:
Quote:$ cat xbmc.log | grep psx
22:40:56 T:3019589424 M:326762496 INFO: Loading special://masterprofile/keymaps/psx-controller.xml
22:40:56 T:3019589424 M:326762496 INFO: Loading special://profile/keymaps/psx-controller.xml

when pressing button/axis nothing happens, it said that "Joystick button ids of connected joysticks appear in xbmc.log when they are pressed." but nothing appears (debug is on).
I tried "remote send keyboard keys" option even if i'm not sure it's related => no changes.

cat /dev/input/js0 and cat /dev/input/js1 produce output when pressing buttons.

any idea why no button ids appears in log?
Reply
#2
well, I don't really know why but it almost works.
new psx-controller.xml :
Code:
<keymap>
        <global>
                <joystick name="Dual USB Vibration Joystick">
                        <button id="1">PreviousMenu</button>    <!--triangle-->
                        <button id="2">ContextMenu</button>     <!--circle-->
                        <button id="3">Select</button>  <!--cross-->
                        <button id="4">ParentDir</button>       <!--square-->

                        <button id="5">VolumeDown</button>      <!--L2-->
                        <button id="6">VolumeUp</button>        <!--R2-->
                        <button id="7">SkipPrevious</button>    <!--L1-->
                        <button id="8">SkipNext</button>        <!--R1-->

                        <button id="9">ShowSubtitles</button>   <!--select-->
                        <button id="10"></button>       <!---->
                        <button id="11"></button>       <!---->
                        <button id="12">OSD</button>    <!--start-->

                        <axis id="1" limit="+1"></axis> <!--left-->
                        <axis id="1" limit="-1"></axis> <!--right-->
                        <axis id="2" limit="+1"></axis> <!--down-->
                        <axis id="2" limit="-1"></axis> <!--up-->

                        <hat id="1" position="left">Left</hat>
                        <hat id="1" position="right">Right</hat>
                        <hat id="1" position="up">Up</hat>
                        <hat id="1" position="down">Down</hat>
                </joystick>
        </global>
        <FullscreenVideo>
                <joystick name="Dual USB Vibration Joystick">
                        <button id="2">Info</button>    <!--circle-->
                        <button id="3">Pause</button>   <!--cross-->
                        <button id="4">Stop</button>    <!--square-->
                </joystick>
        </FullscreenVideo>
        <Visualisation>
                <joystick name="Dual USB Vibration Joystick">
                        <button id="2">Info</button>    <!--circle-->
                        <button id="3">Pause</button>   <!--cross-->
                        <button id="4">Stop</button>    <!--square-->
                </joystick>
        </Visualisation>
</keymap>

the jhat hack [1] is needed. someone know if I should open a bug for this? (ie: is it fixable?)

[1] http://hans.fugal.net/blog/2007/06/02/jo...e-in-linux
Reply

Logout Mark Read Team Forum Stats Members Help
configuring a playstation1 controller0