Ubuntu – How to disable mouse wheel scroll in ubuntu 11.04 or 10.10

mousemouse scrollwheelxorg

ive got problem with broken scroll wheel. (I know i shoud change mouse, its old). And i want to just disable wheel scroll but not middle button click.

I know that it is possible to do, but cant find that config file. (have no entry at xorg.conf)

Best Answer

Ive found out how to configure that. Open terminal window:

xinput list 

find there yours mouse id number

↳ A4Tech PS/2+USB Mouse id=8 [slave pointer (2)]

ive got ID=8

next:

xinput list 8

You ll see there

Button labels: Button Left Button Middle Button Right Button Wheel Up Button Wheel Down Button Horiz Wheel Left Button Horiz Wheel Right Button Side Button Extra Button Forward Button Back Button Task Button Unknown Button Unknown Button Unknown Button Unknown

they are counted by numbers 1,2,3,4,5,6,7 ...

now do that:

xinput get-button-map 8

you will got something like that

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

numbers 4 and 5 are for "mouse wheel up scroll" and "mouse wheel down scroll"

now we will disable them with zero number:

xinput set-button-map 8 1 2 3 0 0 

thats all.