LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   how do i switch mouse buttons (https://www.linuxquestions.org/questions/linux-general-1/how-do-i-switch-mouse-buttons-274507/)

ZaphyR 01-06-2005 04:07 AM

how do i switch mouse buttons
 
using xev i can see that all my buttons are working, but my wheel is working as my thumb buttons and vice versa.

scroll up is 6
scroll down is 7
thumb one is 4
thumb two is 5

it should be like this:

scroll up 4
scroll down 5
thumb one 6
thumb two 7

how do i switch the buttons???

thanks

MasterC 01-06-2005 04:51 AM

xmodmap ;)

Cool

ZaphyR 01-06-2005 05:28 AM

i have already tried xmodmap...without luck.

my xorg.conf looks like this at the moment:

Code:

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "explorerps/2"
        Option      "InputFashion" "Mouse"
        Option      "Name" "Logitech MX510"
        Option      "Device" "/dev/mouse" # (/dev/input/mice also appears to work)
        Option      "Buttons" "7"
        Option        "ZAxisMapping" "6 7"
EndSection

and i have tried to change the buttons with these commands:

Code:

echo -e "pointer = 1 2 3 6 7 4 5\n" > ~/.Xmodmap
and/or

Code:

xmodmap -e "pointer = 1 2 3 6 7 4 5"
but the buttons remains the same....

MasterC 01-06-2005 05:42 AM

Try variations to ensure xmodmap is working, such as switching the 123 to 321

Cool

ZaphyR 01-06-2005 08:06 AM

wow!

i did
Code:

xmodmap -e "pointer = 3 2 1 6 7 4 5"
and then the right and left mouse button changed place...but actually so did 6-7 and 4-5!!

so i did
Code:

xmodmap -e "pointer = 1 2 3 6 7 4 5"
and now all mouse buttons are working as they should!!

it seems xmodmap just needed a "kickstart" :)

thanks

MasterC 01-07-2005 03:58 AM

Sure, no problem ;)

Cool

ZaphyR 01-09-2005 05:52 PM

well, it doesnt work as well as i thought...
when i reboot, the changes are lost, and i have to xmodmap again to chane the buttons. this happens every time...

any suggestions?

MasterC 01-09-2005 09:52 PM

You normally call it inside your .xinit or .xsession file, so the change happens at that time.

Cool


All times are GMT -5. The time now is 11:47 PM.