Abandoned on Fire

I'm mapping an xbox afterglow gamepad for piggy use.  The dpad is unfortunately the "hat" joystick axis.  What's the correct syntax for this in mapping.xml?

The piggy event dump for the dpad is this:

[EVENT] hat(0)::0::3
[EVENT] hat(0)::0::1
[EVENT] hat(0)::0::0
[EVENT] hat(0)::0::2

and what I've tried already is this:

<MAP src="hat:0:0" dst="/event/up" />
<MAP src="hat:0:2" dst="/event/down" />
<MAP src="hat:0:3" dst="/event/left" />
<MAP src="hat:0:1" dst="/event/right" />
<MAP src="but:0:0" dst="/event/a" />
<MAP src="but:0:1" dst="/event/b" />
<MAP src="but:0:2" dst="/event/a" />
<MAP src="but:0:3" dst="/event/b" />
<MAP src="but:0:5" dst="/event/rshoulder" />
<MAP src="but:0:4" dst="/event/lshoulder" />
<MAP src="but:0:7" dst="/event/start" />
<MAP src="but:0:6" dst="/tempo/tap" />

All the buttons work but the dpad does not and in the log the "attached blah blah" isn't there for the "hat" mappings either.

Abandoned on Fire

The solution was to use all three digits just like in the log output.  Like hat:0:0:0

Trust the log.  It is wise and just.

(also Marc was kind enough to help me)

France Eure Et Loire

Hello (after 6 years... but I have exactly the same problem).

The joystick react but I think my controller is a little ruined and it's hard to use lgpt with it as cursor goes sometimes to right instead of down etc because you have to be very specific. For the D-pad, that should be better but...
I have that :

LOG: hat(0)::0=8
LOG: hat(0)::0=0
LOG: hat(0)::0=4
LOG: hat(0)::0=0
LOG: hat(0)::0=2
LOG: hat(0)::0=0
LOG: hat(0)::0=1
LOG: hat(0)::0=0

So I tried hat:0:0:1 like egr said in this post but it don't work for me. There is the "=" which was not on egr's controller.

France Eure Et Loire

I have found an other USB controller I had somewhere, but it's nes style, dpad, select, start, A and B, no shoulder.

I tried to map both shoulder left and right to select, and it works for the page, I can go everywhere except quitting project screen, but I can't do copy operations like select+b in LSDJ (shoulder L + b in LGPT)

So it means that only shoulder right works, i can't mapp select to both shoulder right and left, only the first assignation will work
That should be better if select could do the job like on LSDJ. I think maybe it's that because it was created for consoles which don't have select at good position, but maybe this can be also changed? Maybe have to compile lgpt for that...

So I think I will just try with other controllers (have to buy new...) until it works good. One with no joystick but Dpad and shoulders should be a good candidate.

Last edited by MazHoot (Dec 17, 2020 12:42 pm)


Yea you defo need a controller with shoulder buttons! Every port it has been for has been at least snes controller spec