Figuring out controller buttons
So I have a PS3 controller (plugged in via USB) and a retro SNES usb controller. My question is how do I figure out which buttons do what? I use jstest but my main button is "button 0", which is not on the options list for hedgewars. I can figure out my snes controller eventually with trial and error, but the PS3 controller will take an eternity..it apparently has 9(!!!) axes. Is there any way to just press the button on the controller mapping screen instead of selecting it from a list? Or am I just going to have to suck it up and take the time to figure it out?
Also, if anyone is using these controllers is there an ideal button mapping I could use? Any help is appreciated. I am using lubuntu if that makes any difference. Thanks in advance!
Hi and welcome Granturismoguy!
Sadly the "capture on key/button press" method of selecting key binds is not supported yet ( see issue 762 ).
So I'm afraid the "suck it up" approach is the only option within Hedgewars so far.
The game uses SDL for processing inputs though.
Provided you find a list of PS3 buttons->SDL keycodes or download/build that little SDL input test program that will tell you the keycodes of buttons you press,
you could probably just edit the .hwt file in a text editor and assign the SDL keycodes of the buttons to the desired actions there.
(In that case I'd recommend testing it with one button first before you fill in all)
Sorry :/
sheepluva <- me my code stats ->
a Hedgewars Developer
click here to message me
<- where I'm from what I speak ->
Thank you...I will give this a try when I get home from work. I'm not exactly tech saavy but I can copy and paste with the best of them
Well, I have been trying to map controller buttons for the last 2.5 hours but to no avail. The PS3 one was just a disaster, the retro snes usb one did better but ultimately it did not have any selection for the Y and B buttons oddly enough. It was a stretch to play it on that anyway, as I would have had to use the mouse as well since it doesn't seem I can map one button to more than one function (ie, using d-pad to move AND scroll through the menu). I looked for SDL keycodes, particularly for the PS3 controller but again I couldn't find anything. If anyone has successfully done this, please let me know. I really love this game and would much prefer playing with a controller.
As I mentioned, I am NOT tech saavy, so if you have suggestions, and if you could, please put them in simpletons language so I can understand. Thank you in advance! I will try any suggestion!
I'd try using the program JoyToKey, as it's easier than Hedgewars' current gamepad configuration, and you can also map 2 keys to one button, for instance, my gamepad has a "back" button on it, so I could map Esc and Y to that button and it will automatically quit the game.
http://joytokey.net/en/
The only problem is that, unless you have a second control stick and 2 spare buttons your still going to need the mouse for selecting weaponry and such.
I can't use that since I am running Ubuntu, unfortunately. There is similar programs but they seem to be quite old