10

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)

migrated from serverfault.com Aug 29 '11 at 14:13

This question came from our site for system and network administrators.

14

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.

  • Nicely done, and I learned some things from your answer. But an easier way of identifying the buttons (works for scrollwheel too) described here: unix.stackexchange.com/a/20595/28245 – Lambart Sep 19 '14 at 18:52
  • In short, assuming buttons 4 and 5 are the scroll wheel (they are for me, too), just put this line in a file called .Xmodmap in your home directory: pointer = 1 2 3 0 0 6 7 8 9 (note that I think this will disable any buttons beyond 9--add more numbers if needed) – Lambart Sep 19 '14 at 18:54
  • 1
    this doesn't work in Ubuntu 16.04 but it works fine on Ubuntu Mate 16.04 :/ strange – Felipe Morales Oct 14 '16 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.