Joypad with analogue buttons breaks keyboard input
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-
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_
No bind found for key 'JOY_AXIS4_
No bind found for key 'JOY_AXIS4_
No bind found for key 'JOY_AXIS4_
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_
pessing buttons on the joypad is looks like this:
No bind found for key 'JOY_AXIS4_
No bind found for key 'JOY_AXIS4_
No bind found for key 'JOY_AXIS4_
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.
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.