How do I set up extra mouse buttons?

I am mainly interested in the scroll wheel buttons (left and right). In Ubuntu I could do that with Xbindkeys and I see Arch has a documentation on that https://wiki.archlinux.org/index.php/Xbindkeys but I installed Xbindkeys on Manjaro and it doesn’t work. What should I do?

I need to first identify those buttons, then assign a command to them or a bunch of keys. I have the old Xbindkeys file from Ubuntu where I had this working:

History Back & Forward

"xte ‘keydown Alt_L’ ‘key Left’ ‘keyup Alt_L’ "
b:16
"xte ‘keydown Alt_L’ ‘key Right’ ‘keyup Alt_L’ "
b:17

“xbindkeys_show”
control+shift + q

But as I said in Manjaro it doesn’t work. I used those buttons quite a lot in Ubuntu and I want to use them in Manajro too :wink:

Thanks!

Depending on your chosen desktop environment you can customize keypresses as you like.

xcape is a possible solution

In Xfce Settings ManagerKeyboardShortcuts tab

Hi. I use Manjaro with Gnome. My buttons cannot be identified simply through a tool like keyboard shortcuts. I think they have to be mapped somehow. First to identify them, then map them with a command or keystroke.

Did you check if the button IDs are correct using xev?

Should I install xorg-xev for that?

Yes, exactly!

Ok. I installed and checked. Buttons are correct. Maybe the “.xbindkeysrc” syntax is not correct?

"xte ‘keydown Alt_L’ ‘key Left’ ‘keyup Alt_L’ "
b:16
"xte ‘keydown Alt_L’ ‘key Right’ ‘keyup Alt_L’ "
b:17

Please also check if the package xautomation is installed. It includes xte, which you use to simulate key presses.

I have xautomation installed. How can I use it? And thank you so much for helping!

Just to double-check
-You’ve placed the relevant code in ~/.xbindkeys ?
-You’ve reloaded config with xbindkeys -p ?
-You’ve put xbindkeys in either ~/.xprofile or ~/.xinitrc ?

If so, maybe also check this:
xbindkeys -n
Then press the key that doesnt work to check for errors

Now that xautomation is installed, it should actually just work. If it doesn’t, exchange the xte commands with something like "notify-send 'It works!'" to check if the xbindkeys events are triggered.

Ok. So, this is what I’ve done so far.
I made a text document in “home” directory called “.xbindkeys” and put this code into:

History Back & Forward

"xte ‘keydown Alt_L’ ‘key Left’ ‘keyup Alt_L’ "
b:16
"xte ‘keydown Alt_L’ ‘key Right’ ‘keyup Alt_L’ "
b:17

“xbindkeys_show”
control+shift + q

Next I run this command " xbindkeys -p". But still not working. " xbindkeys -n" doesn’t return anything. Maybe I am doing something wrong here.

How can I do that more exactly?

my post had a typo … but is your file actually .xbindkeys ? it should be

.xbindkeysrc

also have a look at its man page as -p might be deprecated:
man xbindkeys

You also must actually start xbindkeys somehow … either by launching it manually, in a script, in startup items, or as wiki points to .xinitrc or .xprofile

-p used to reload config … but now I guess xbindkeys automatically updates changes in config file. https://linux.die.net/man/1/xbindkeys

I tried with xbindkeys too. Nothing works.
man xbindkeys seems to not work either.

Not even the default example of :

“xbindkeys_show”
control+shift + q
is not working.

So I suspect “xbindkeys” doesn’t really work. I am unsure why or how to test it out. Is there any other alternative?

Is there some suspicious output if you start xbindkeys from command line?

There’s nothing:

[tio@tio-pc ~]$ xbindkeys
[tio@tio-pc ~]$

Anyone has any idea how to fix this? I really miss those buttons and I cannot map them in any way. Isn’t there an easy way to do this?

Try uninstalling xbindkeys and then reinstalling by doing

sudo pacman -S xbindkeys

:woman_shrugging:

[tio@tio-pc ~]$ sudo pacman -S xbindkeys
[sudo] password for tio:
resolving dependencies…
looking for conflicting packages…

Packages (1) xbindkeys-1.8.6-2

Total Installed Size: 0,05 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring [######################] 100%
(1/1) checking package integrity [######################] 100%
(1/1) loading package files [######################] 100%
(1/1) checking for file conflicts [######################] 100%
error: failed to commit transaction (conflicting files)
xbindkeys: /usr/bin/xbindkeys exists in filesystem
xbindkeys: /usr/bin/xbindkeys_show exists in filesystem
xbindkeys: /usr/share/man/man1/xbindkeys.1.gz exists in filesystem
xbindkeys: /usr/share/man/man1/xbindkeys_show.1.gz exists in filesystem
Errors occurred, no packages were upgraded.

How to uninstall it properly? I did it already from the package manager. Thanks!

Forum kindly sponsored by