Lubuntu
linux Tips (2015-2020) |
Disable mouse
buttons Stop those annoying side keys on the mouse (updated
for lubuntu 20.04)
|
Have you got one of
those mices with side keys that get in the way ? You grab the mouse to do something urgent and accidently click a side key that changes your web page. Those side keys are 'too' conveniently placed close to your thumb, that you hit them all the time. So here is an easy way to disable them. 1. Open a terminal and type > xinput list
--short
You'll get something like this; ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ SIGMACHIP USB Keyboard id=9 [slave pointer (2)] ⎜ ↳ 2.4G Wireless Optical 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)] ↳ SIGMACHIP USB Keyboard id=8 [slave keyboard (3)] [2]+ Done leafpad upback (wd: ~/utils) And you can guess (in this case) the mouse device ID as 10. (it will be different for yours). 2. Once you know how to get the ID, you can run this command. >
xinput set-button-map
10 1 2 3 4 5 0 0
0 0
The command actually defines a button map where each position is given a button number;
Those side keys are in position 8 and 9. Putting zeros in those positions will disable them. 3. If you want this permanent (happen at start up), Add the following line in your
<something>.conf file inside /usr/share/X11/xorg.conf.d
Option "ButtonMapping" "1 2 3 4 5 0 0 0 0" e.g /usr/share/X11/xorg.conf.d/45-mouse.conf Section "InputClass"
Identifier "mouse" MatchDriver "libinput" MatchIsPointer "yes" Option "AccelSpeed" "-0.2" Option "AccelProfile" "flat" Option "ButtonMapping" "1 2 3 4 5 0 0 0 0" EndSection End. |
||||||||||||||||||
Advertisement Space [ More Lubuntu Tips, Home ] |