How to remap mouse on Fedora 39 with xbindkeys?

Hello,
I am new to Fedora. I have been using Ubuntu and remap my mouse (I use Logitech) with xbindkeys.

I downloaded xbindkeys with sudo dnf install xbindkeys. I also installed the following sudo dnf install automation but I could not install

$ sudo dnf install x11-utils 
insync repo                                      45 kB/s | 2.9 kB     00:00    
No match for argument: x11-utils
Error: Unable to find a match: x11-utils

I copied the .xbindkeysrc I have been using on Ubuntu on the Home folder and then activated it with

killall -s1 xbindkeys
xbindkeys -f ~/.xbindkeysrc

yet nothing happened. The extra buttons of the mouse do not do what I instructed them to do.

How can I activate xbindkeys on Fedora?

Or is there a simpler way to map the mouse on Fedora?

Thank you

Don’t use xbindkeys would be the starting point as most likely you’re using a wayland session so any X tools are not going to help.

There are other, lower level, ways to do it though by telling the kernel what event to emit for each button. I have a file called /etc/udev/hwdb.d/99-mouse.hwdb for example which contains:

evdev:input:b0003v046DpC046*
 KEYBOARD_KEY_90004=btn_middle

to force one of the buttons to generate a middle mouse event.

See How to remap mouse buttons on GNOME with Wayland, without running an extra service? for a previous discussion on the details.

1 Like

Thank you, I had a look at the post but it is too complex for me. Is there not a GUI to simply assign copy/paste on the additional mouse buttons? Also, for me:

$ cat /etc/udev/hwdb.d/99-mouse.hwdb
cat: /etc/udev/hwdb.d/99-mouse.hwdb: No such file or directory