[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Re: Mouse works with X but breaks as a left-handed...



Hi Everyone,
I did some tests using xmodmap and xev to see what could be wrong and this is what I've found:
Running xmodmap when right handed:
$xmodmap -pp
There are 5 pointer buttons defined.
Physical           Button
 Button             Code
    1                 1
    2                 2
    3                 3
    4                 4
    5                 5

/* Switching to left-handed */

$xmodmap -e "pointer = 3 2 1 4 5"
There are 5 pointer buttons defined.
Physical           Button
 Button             Code
    1                 3
    2                 2
    3                 1
    4                 4
    5                 5

/* Funny thing is... after switching the mouse buttons and running xterm like:*/

$xterm -e xev

to see the mouse events, I found that Clicking with the button 1, triggers two events:
1. ButtonPress event, ...., ..., ...., button 1
2. ButtonRelease event, ...., .., ..., button 3

and something similar happens with button 3:
1. ButtonPress event, ...., ..., ...., button 3
2. ButtonRelease event, ...., .., ..., button 1

Please note that the ButtonPress event is on some button and the ButtonRelease event has the value of another button. My guess is that, ButtonPress and ButtonRelease events should both return the event for the same button as it happens with button 2 or any other button when right handed, pretty obvious I guess but has anybody an idea of how to fix this????




Reply to: