Topic: Easy way to invert left-right mouse buttons.

If you are left-handed (I am smile), you may desire to invert left-right mouse buttons. Edit your "autostart.sh" and copy this at the beginning:

# left-handed mouse (or the name you want).
xmodmap -e "pointer = 3 2 1"

Save your "autostart.sh", then restart your session. This will activate this option since the graphical session.

Here is the beginning of my "autostart.sh"

# Run the system-wide support stuff
. $GLOBALAUTOSTART

# Programs to launch at startup
# =============================

# Left-handed mouse
xmodmap -e "pointer = 3 2 1"

# Start session manager
lxsession &

# Enable power management
gnome-power-manager &

# Set keyboard map if different than UK
# Uncomment one to enable, or define your own.
setxkbmap fr & # Francais

If you want to identify your mouse buttons copy this in a terminal:

xev | grep button

This run perfectly with my "logitech LS1", a good laser mouse for the price and for my use.
I hope my explanations are clear because English is not my first language.

A+ Francis.

Re: Easy way to invert left-right mouse buttons.

....and here's a little script to easily switch mousebuttons:

#!/bin/bash

current=$(xmodmap -pp | head -5 | tail -1 | awk '{print $2}');

if [ "$current" -eq "1" ]
then 
        xmodmap -e "pointer = 3 2 1";
else
        xmodmap -e "pointer = 1 2 3";
fi
Name the greatest of all inventors. Accident. - Mark Twain

Re: Easy way to invert left-right mouse buttons.

Hello pitje!
That's an interesting script.

A+ Francis.