Is there a way to swap click and middle click buttons permanently in Kubuntu?
$xinput list
Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ ImExPS/2 Generic Explorer Mouse id=10 [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)]
↳ cx88 IR (Leadtek Winfast 2000XP id=8 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=9 [slave keyboard (3)]
Getting the ID of your mouse:
You can get it running
xinput list
:I have two mouse IDs (10 and 11), therefore I have to test the right ID.
Swapping the buttons:
You can swap the mouse buttons running this (where
10
is the ID):You can revert the change with:
Swap the buttons automatically when X starts:
Run this command to edit the 91swapmousebuttons file:
Add this line to it:
Explaination of the parameters passed to xinput:
set-button-map
changes the button map of a device.10
is the device ID.2 1 3
means:2
: It's on the 1st position, so the first button (LMB) is mapped to button 2 (MMB).1
: It's on the 2nd position, so the second button (MMB) is mapped to button 1 (LMB).1
: It's on the 3rd position, so the third button (RMB) is mapped to button 3 (LMB).Note that LMB is Left Mouse Button, MMB is Mid Mouse Button and so on.
Quote from
man xinput
: