In most cases,
This can be useful for changing the mouse for left-handed people.
xinput set-button-map 8 3 2 1 4 5 6 7 8 9
NOTE: The initial 8 is the Mouse Id as determined above.
xinput set-button-map 8 1 0 3 4 5 6 7 8 9
NOTE: The initial 8 is the Mouse Id as determined above.
One approach is to create a shell script that performs the Mouse Button mapping:
echo "xinput --set-button-map 21 3 2 1" > leftmouseremap.sh
Give it executable permission:
chmod +x leftmouseremap.sh
NOTE: Either run the script manually, or configure it to automatically run on system reboot.