[SOLVED] Mapping mouse thumb buttons with xbindkeys - intermittent stuck Ctrl-down key when

This is an FYI followup post to Getting xbindkeys to work.
Specifically how to map the mouse thumb-L and thumb-R buttons of a cheap 6 button "gamer" mouse to the zoom-in and zoom-out functions. This works to zoom in/out a terminal window, browser window, font size in Sublime and other editors, etc. with your mouse thumb buttons.
I spent a long time trying to do the same with the 'xvkbd' tool/command before switching to 'xdotool'. Xvkbd did work but intermittently it would get stuck with the button down and to unstick it you'd have to hit the Ctrl button. Xdotools as used below does not have this problem.

  1. Ensure xbindkeys, xev, and xdotool are installed.
  2. use xev to discover the number of your mouse buttons (mine were 8 and 9 below)
  3. setup xbindkeys to run at startup
  4. Create ~/.xbindeysrc file and add the following lines:

"xdotool key --clearmodifiers ctrl+plus"
"xdotool key --clearmodifiers ctrl+minus"

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

Forum kindly sponsored by