Stumped configuring Keymap.xml
#1
Running 2.1a2svn13953-hardy1, under Ubuntu 8.04.

I've been trying to get a PSOne controller, connected to XBMC through an LTS PSX/USB adapter, working properly with XBMC. I have more or less got it, somewhat based on the configuration given for the PS3 controller and the default mapping for the XBox controller. It was just a matter of putting the proper identifying information (LTS PSX/USB Pad) in Keymaps.xml and figuring out the buttons and axis values.

The only problem is the d-pad is far too sensitive - one quick tap of the pad moves the cursor 4 or 5 clicks. I've searched the wiki, forums, etc, but I haven't located how to tell it to not start instantly repeating the d-pad "keypress". Below is what I've done with Keymap.xml; it's incomplete, no point in tweaking it more unless the d-pad control basics can be made usable.

Code:
<joystick name="LTS PSX/USB Pad">  
      <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>

from Hardinfo:
Code:
LTS PSX/USB Pad
Type Joystick
Bus  0x3
Vendor 8631
Product 0x1128
version 0x100
Connected to usb-0000:00:1d.1-2/input0
Thanks for any help anyone can give.
Reply
#2
So, this is impossible, then? Pity, seems the more controllers that Just Work when the user plugs 'em in, the better.
Reply
#3
SDL is providing the interface to joysticks. im sure there must be a way to calibrate thru SDL, but its not currently possible through xbmc.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#4
I see. Using the jscal application it seems to be properly calibrated. It strikes me as odd that the D-Pad is recognized as an analog control when it's simply four digital switches, but I figured there was a valid reason. Either way, this seems to be a bit more complicated to deal with than I was hoping for when I almost got it working. If there's no way to simply say to XBMC "ok, now don't start repeating until X milliseconds after I've been holding the D-pad", then this is probably out of my league. Thanks for the info, though.
Reply
#5
huh? the dpad is being recognized as an analog control? im in the process of restoring my linux box. i'll have a play with it, but probably not for a few weeks.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#6
kraqh3d Wrote:huh? the dpad is being recognized as an analog control? im in the process of restoring my linux box. i'll have a play with it, but probably not for a few weeks.

I don't think that's an XBMC thing, that just seems to be how the linux driver for this PSX to USB adapter treats the input. Each axis of the D-pad is an analog input with three possible values of either -1, 0, or 1. Zero being "at rest". I'd assumed it would treat the D-Pad input as buttons - this adapter isn't supposed to support the pressure sensitivity on Dual Shock 2 era controllers. But this could be me misunderstanding the nature of controller input handling.
Reply
#7
I had the same issue with a digital joypad, I can't use the dpad because every press is treated as 4-5 movements
Reply
#8
I also had the same problem with logitech cordless rumblepad 2. Fortunately I found a workaround: http://hans.fugal.net/blog/2007/06/02/jo...e-in-linux http://hans.fugal.net/src/jhat.tar.gz It basically maps joystick axes to directional keys.
Reply
#9
Raakakelkka Wrote:I also had the same problem with logitech cordless rumblepad 2. Fortunately I found a workaround: http://hans.fugal.net/blog/2007/06/02/jo...e-in-linux http://hans.fugal.net/src/jhat.tar.gz It basically maps joystick axes to directional keys.

thanks. i had the same issue. i have the wireless rumbplepad 2. i wish i was better with c. i imagine its not too hard to edit jhat to take advantage of the 2 "thumb-pads also". "jhax <dev> <x> <y> <a> <b> <c> <d>" can anyone help or explain how to ?

Raakakelkka, if you're using the RubmplePad too would you mind sharing your keyMap.xml ?

i only have global mapped this far ( KeyMap.XML ) ...
Image

cheers
zosky
rPi 2&3 | android phones | fireHD8 | linux | win10 + NFS NAS w/ mySQL + props to...
libreElecyatse, titan, AELflexGet, context.manageTags (a zosky original)
Reply
#10
Here's my Keymap.xml. I think it won't help you much since there is no logic in the bindingsBlush. Also i have used thumbsticks to scroll menus, adjust volume and winding through videos. Works quite nicely so there is no need to make those sticks like the d-pad IMHO.
Reply
#11
Raakakelkka Wrote:I also had the same problem with logitech cordless rumblepad 2. Fortunately I found a workaround: http://hans.fugal.net/blog/2007/06/02/jo...e-in-linux http://hans.fugal.net/src/jhat.tar.gz It basically maps joystick axes to directional keys.

Oh God... U made my day with this post.... Thanks alot... This solved all my problems

Cordless Rumblepad 2
Reply
#12
Same Problem here , but the Link to the Jhat Fix is dead! Sad
The other Link from Raakakelkka to his Keymap.xml is dead, too.

Sad

I need help! ^^


Greets
lenn1


edit: I found the jhat.tar.gz in another forum , but then happened this:

Quote:xbmc@XBMCLive:~/jhat$ ./jhat /dev/input/js0 4 5
Unable to open display 'default'

edit2:

i used the following commands and now it works.
Quote:export DISPLAY=:0

The Question is: How can i get this to start automatically on systemboot?
Reply
#13
lenn1 Wrote:Same Problem here , but the Link to the Jhat Fix is dead! Sad
The other Link from Raakakelkka to his Keymap.xml is dead, too. edit: I found the jhat.tar.gz in another forum , but then happened this: i used the following commands and now it works. The Question is: How can i get this to start automatically on systemboot?

in the file /usr/bin/runXBMC
below echo "#!/bin/bash" > /home/xbmc/.xsession
add echo "/path/to/jHat -swtches" >> /home/xbmc/.xsession

you'll need to do this each time you upgrade xbmc
rPi 2&3 | android phones | fireHD8 | linux | win10 + NFS NAS w/ mySQL + props to...
libreElecyatse, titan, AELflexGet, context.manageTags (a zosky original)
Reply
#14
Hi I have this gamepad (rumblepad 2 cordless)

What do you put when you do:
./jhat /dev/input/js0 x z

What I must write in the x and z?
Many thanks and sorry for my english!
Reply
#15
mierdatuti: x & z are the axis you want jhat to control
use 4 & 5 to have it control the left-thumb stick, like the example above
if you use different numbers it will control diffrent sticks ( like 2&3 for the right )
rPi 2&3 | android phones | fireHD8 | linux | win10 + NFS NAS w/ mySQL + props to...
libreElecyatse, titan, AELflexGet, context.manageTags (a zosky original)
Reply

Logout Mark Read Team Forum Stats Members Help
Stumped configuring Keymap.xml0