Change mouse primary key in setting in i3WM XFCE

Hi,
I have been using i3 for a while. As I was trying to change the primary click button on my mouse from left to right I was unable to find a GUI setting to do so. I did try running lxappearance but it doesn’t provide this option.

Wonder if there is any package which can be installed to change his behaviour

I did try kmousetool and mousetweaks , but it didn’t work either
pls help

https://wiki.archlinux.org/title/Mouse_buttons#xmodmap_tweaking
the article mentions left-handed…

~/.Xmodmap
insid ethis file (~ links to your user home :wink: )
pointer = 1 2 3 6 7 8 9 10 11 12 4 5

but you need to find out what numers arte for what button first.,…
may:

xev -event button | grep button

can track this…
2023-01-09_12-38

what it shows for me … 1 for left 3 for right…

seems to work for me…
pointer = 3 2 1 6 7 8 9 10 11 12 4 5

2 Likes

What if you insert this line into i3 config:

# Autostart apps as you like
exec --no-startup-id xmodmap -e "pointer = 3 2 1"

Edit1: If you insist on a GUI setting consider merging XFCE and i3 (Then: Settings Manager / Mouse and Touchpad)
It still works

Or just add this to your config file. It’s similar to what @eso posted.

exec xmodmap -e "pointer = 3 2 1"

i3 will read the file and set the mouse buttons accordingly.

2 Likes

Thanks very much this work fine for me.
I included the line in my i3 config and re-logged in.

Thanks

Many thanks

1 Like

Many roads lead to Rome :wink:

You know, looking at the map, it’s not as many as I thought there would be given the saying. . .

2023-01-14_12-09