Public bug reported:

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.

** Affects: mplayer (Ubuntu)
     Importance: Undecided
         Status: New

-- 
Joypad with analogue buttons breaks keyboard input
https://bugs.launchpad.net/bugs/121846
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to