Joystick button pressure

Is there a way to get the value of how hard a button is pressed on a
joystick? I’m trying to use my Playstation 2 controller with SDL, and
I know that it has pressure sensitive buttons.

Thanks, Josiah.

Nope. USB doesn’t support pressure sensitive buttons anyhow, unless you’re
using a non-HID setup… which SDL doesn’t support anyhow.On Friday 30 December 2005 22:53, Josiah Manson wrote:

Is there a way to get the value of how hard a button is pressed on a
joystick? I’m trying to use my Playstation 2 controller with SDL, and
I know that it has pressure sensitive buttons.


Patrick “Diablo-D3” McFarland || @Patrick_McFarland
"Computer games don’t affect kids; I mean if Pac-Man affected us as kids,
we’d all be running around in darkened rooms, munching magic pills and
listening to repetitive electronic music." – Kristian Wilson, Nintendo,
Inc, 1989

I do this with a cheap adapter I got for $12 - hit the analog button on
the controller and the requisite buttons show up as standard joystick
axes.> On Friday 30 December 2005 22:53, Josiah Manson wrote:

Is there a way to get the value of how hard a button is pressed on a
joystick? I’m trying to use my Playstation 2 controller with SDL, and
I know that it has pressure sensitive buttons.

Nope. USB doesn’t support pressure sensitive buttons anyhow, unless you’re
using a non-HID setup… which SDL doesn’t support anyhow.


Shiro Akaishi <@Shiro_Akaishi>

Nope. USB doesn’t support pressure sensitive buttons anyhow, unless you’re
using a non-HID setup… which SDL doesn’t support anyhow.

I do this with a cheap adapter I got for $12 - hit the analog button on
the controller and the requisite buttons show up as standard joystick
axes.

That’s pretty cool. So, your computer calls the controller a 16 axis
joystick? Mine just treats them as normal buttons still.

That’s pretty cool. So, your computer calls the controller a 16 axis
joystick? Mine just treats them as normal buttons still.

Hrm, I was under the impression that just the X and square buttons were
analog. That’s how mine is anyway.–
Shiro Akaishi <@Shiro_Akaishi>

This is what something I found on the web says, “All of the buttons
(except for the SELECT, START and ANALOG mode buttons) are pressure
sensitive.” I’m guessing that the analog mode buttons are the
joysticks that you can push in. I’m not sure if “buttons” includes the
arrow things on the left. So, there should be at least 12 axes. If the
arrow things are pressure sensitive, that would be 4 more, so 16.On 1/1/06, Shiro Akaishi wrote:

That’s pretty cool. So, your computer calls the controller a 16 axis
joystick? Mine just treats them as normal buttons still.

Hrm, I was under the impression that just the X and square buttons were
analog. That’s how mine is anyway.

That’s pretty cool. So, your computer calls the controller a 16 axis
joystick? Mine just treats them as normal buttons still.

Hrm, I was under the impression that just the X and square buttons were
analog. That’s how mine is anyway.

Every button, with the exception of L3, R3, start, and select (I think),
has an analog pressure sense. It’s the only thing the dual shock 2 does
differently from the older dual shock controllers. I suspect a number of
USB adapters use the controller as the older dual shock for increased
compatibility. I’ve made my own gizmo that does exactly that since the new
controllers are backwards compatible.

As for SDL, I wrote a kernel module to support my gizmo and SDL games can
now use it. :-)On Mon, 2 Jan 2006, Shiro Akaishi wrote:


Jeff Jackowski
http://ro.com/~jeffj/