User Tools

Site Tools


ubuntu:mouse:map_mouse_buttons

This is an old revision of the document!


Ubuntu - Mouse - Map Mouse Buttons

Map the Mouse Buttons

xinput set-button-map 8 1 0 3 4 5 6 7 8 9

NOTE: The initial 8 is the Mouse Id as determined above.

  • The remaining 1 0 3 4 5 6 7 8 9 is the 9 mouse buttons as determined above.
  • Here, button 2 is replaced by a zero.
    • This disables this button.
  • For left-handed people, the left and right buttons could be swapped around (the 3 and 1 are switched).
    • 3 2 1 4 5 6 7 8 9

Mapping Mouse Buttons to Arbitrary Functions

Create or edit ~/.xbindkeysrc.

  • To create a double-click event when a button is released, I added the following:
~/.xbindkeysrc
"/usr/bin/xte 'mouseclick 1' 'mouseclick 1' &"
b:8 + Release

The format of this file is a series of paired lines. The first line is a command to be executed for an event; the second line is the event description. We will use the xte component of xautomation to send events directly to the input handler.


References

ubuntu/mouse/map_mouse_buttons.1635154440.txt.gz · Last modified: 2021/10/25 09:34 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki