Joypad with analogue buttons breaks keyboard input

Bug #121846 reported by juve
4
Affects Status Importance Assigned to Milestone
mplayer (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Binary package hint: mplayer

Ubuntu 7.04
Kernel 2.6.21.1
installed packages: joystick, jscalibrator, mplayer

description:
Analogue buttons break hot-keys or mplayer-keyboardinput in general because mplayer thinks they are pressed all the time. The Joypad is configured correctly as i checked in the jscalibrator tool. Axis 4 and 5 - the two anlog shoulder buttons of my Gamecube controller - are in their apropriate deadzones when nothing is pressed. Everything looks fine. When moving/pressing the analogue controls around i notice that they land one very small step out of their deadzones a VERY FEW times.

You might think it's a calibration problem, but it happens everytime if i do the following steps:

1. Plug off your joystick (or in my case the adaper between JS and PC)
2. Plug it in
3. start mplayer (e.g.): ~$: mplayer somevideo.wmv
4. press some keyboard key

When pressing right, left, Q, ESC or some other common Hot-Key i get terminal-messages like these:

No bind found for key 'JOY_AXIS4_MINUS'.-JOY_AXIS5_MINUS-RIGHT
No bind found for key 'JOY_AXIS4_MINUS'.-JOY_AXIS5_MINUS-LEFT
No bind found for key 'JOY_AXIS4_MINUS'.-JOY_AXIS5_MINUS-q
No bind found for key 'JOY_AXIS4_MINUS'.-JOY_AXIS5_MINUS-ESC

pressing on the close-button "X" of the video window does not work either and results in this message:

No bind found for key 'JOY_AXIS4_MINUS'.-JOY_AXIS5_MINUS-CLOSE_WIN

pessing buttons on the joypad is looks like this:
No bind found for key 'JOY_AXIS4_MINUS'.-JOY_AXIS5_MINUS-JOY_UP
No bind found for key 'JOY_AXIS4_MINUS'.-JOY_AXIS5_MINUS-JOY_BTN6
No bind found for key 'JOY_AXIS4_MINUS'.-JOY_AXIS5_MINUS-JOY_BTN1

Mysteriously when stopping mplayer and starting it again: ~$: mplayer somevideo.wmv
and the problem will disappear. The problem will also disappear, if i start jscalibrator first.

About analogue shoulder buttons:
I had similar problems some years ago in Windows, because some apps didn't know about the analogue shoulder button concept, or maybe the driver was not that good.
The problem is, that analogue-buttons are usually mapped/interpreted as analogue axes by many apps. The axis usually have a non-standard calibration-setup e.g. in my case:

axis-min: 24
axis-center: 24
axis-max: 220

Because an analogue controller might send some noise an app might (for the example above) interpret a 23 as a very high axis-min value.

I think Mplayer seems to be affected by this problem, even if i can't explain why it won't happen when starting mplayer a second time. I don't know about what input-types the joystick interface provides but i assume analogue buttons are always mapped to axes and an application has to interpret it right.

More info on my joypad:
For my axis/button 4 and 5 jscalibrator shows the following deadzone values:
JOY_AXIS4: 20-28 (when pressing the button, it never lands out of the zone after release)
JOY_AXIS5: 20-24 (when pressing the button, it some times lands 1-2 digits above and NEVER below !)
Both Buttons never go below the value: 23

Soluton:
if( abs($axis_min - $axis_center) much much smaller than abs($axis_max - $axis_center))
 $axis_values below $axis_center should be ignored to prevent misinterpretation.

Revision history for this message
Jeff Anderson (jander99) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue for you. Can you try with the latest Ubuntu release? Thanks in advance.

Changed in mplayer (Ubuntu):
status: New → Incomplete
Revision history for this message
rusivi2 (rusivi2-deactivatedaccount) wrote :

We'd like to figure out what's causing this bug for you, but we haven't heard back from you in a while. Could you please provide the requested information? Thanks!

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for mplayer (Ubuntu) because there has been no activity for 60 days.]

Changed in mplayer (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.