Skip to content

Instantly share code, notes, and snippets.

@tanyuan
Created April 18, 2016 11:22
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tanyuan/0cfc8af62d09a12bc6523c7825d6f835 to your computer and use it in GitHub Desktop.
Save tanyuan/0cfc8af62d09a12bc6523c7825d6f835 to your computer and use it in GitHub Desktop.
Mouse Button Mapping on Linux

Mouse Button Mapping on Linux

I use Logitech Mouse M705 so I get extra mouse buttons to bind to desired functions.

You need xev, xbindkeys and xdotool installed.

Step 1. Find out button number

Run to find out the current keyboard/mouse key number:

xev

Step 2. Configure

Copy default settings:

xbindkeys --defaults > ~/.xbindkeysrc

Edit ~/.xbindkeysrc to set key bindings:

# Mouse Button 10 to Overview
"xdotool key super"
release+b:10

Step 3. Autostart

Create ~/.config/autostart/xbindkeys.desktop to start xbindkeys when login to desktop environment:

[Desktop Entry]
Name=xbindkeys
Type=Application
Exec=xbindkeys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment