Remapping Mouse buttons 4 & 5: is that possible?

Last month I switched from Windows to Linux (permanently, because I love it and not missing a thing). Unfortunately, last week I lost partial eyesight in one eye (doctors are still looking for the cause, but they are certain it is permanent). And while I can still see fine with one eye, things do get blurry after a while.
To help me, I use the magnifier desktop effect to enlarge the area around the mouse pointer. What I would like to do it map the shortcut buttons to the extra mouse-buttons (4 & 5). I read that KDE allows remapping those, but after some research it seems that is only possible under Wayland? (I’d like to stay on X11 for now).
I then thought I’d use Autohotkey, but that is not available for Linux. Is there an alternative?

Hi @BertMv,

One of these might work for you:

In particular, look at:


kbct (kbct-gitAUR) — Keyboard Customization Tool for Linux. Despite its name, also supports mouse events. This tool allows you to map an event (keyboard or mouse button) to another event. You can define multiple “layers” — lists of maps depending of which modifier you press with an input key. Unfortunately, currently the kbct does not allow you to generate multi-button event. See [1].

Thank you!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.