Skip to content

Xorg

Change the behavior of the mouse buttons

Install xbindkeys and xautomation.

Create the default file with xbindkeys --defaults > ~/.xbindkeysrc and edit it with the following:

## Bind "back" mouse button to Super+Alt+Right
"xte 'keydown Super_L' 'keydown Alt_L' 'key Right' 'keyup Alt_L' 'keyup Super_L'"
 b:9

## Bind "forward" mouse button to Super+Alt+Left
"xte 'keydown Super_L' 'keydown Alt_L' 'key Left' 'keyup Alt_L' 'keyup Super_L'"
 b:8

For the name of the keys use xev -event keyboard.

And execute xbindkeys.

Check keyboard input

xev -event keyboard

tools

  • xdotool - Emulate keyboard presses
  • xprop - Get window properties