Difference between revisions of "Remapping mouse buttons"

From froelix.com - Wiki
Jump to: navigation, search
(Created page with ''''Get a list of all your input devices:''' $ xinput list ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer …')
 
 
Line 17: Line 17:
  
 
'''Notes:'''
 
'''Notes:'''
 +
* To make the remapping permanent, create an executable script which executes the above command and add it to the autostart ([http://www.ubuntu-forum.de/artikel/50682/xinput-befehl-beim-startup-ausf%C3%BChren.html]).
 
* For more details, see [http://wiki.birth-online.de/know-how/software/linux/remapping-mousebuttons]
 
* For more details, see [http://wiki.birth-online.de/know-how/software/linux/remapping-mousebuttons]

Latest revision as of 21:01, 13 January 2014

Get a list of all your input devices:

$ xinput list
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ Logitech Unifying Device. Wireless PID:4026	id=8	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ Power Button                            	id=6	[slave  keyboard (3)]
    ↳ Power Button                            	id=7	[slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard            	id=9	[slave  keyboard (3)]

Remap the desired device buttons by using either the device id or the device name:

$ xinput --set-button-map 8 1 2 3 4 5 8 9 6 7
$ xinput --set-button-map "Logitech Unifying Device. Wireless PID:4026" 1 2 3 4 5 8 9 6 7

This example swaps the functionality of the scroll left/right buttons and the back/forward buttons.

Notes:

  • To make the remapping permanent, create an executable script which executes the above command and add it to the autostart ([1]).
  • For more details, see [2]