This in turn makes the middle mouse button unusable.
This HOWTO describes a script to turn off the wheels conveniently.
This HOWTO requires intermediate skills on your part:
-Knowledge how to save files, how to chmod them executable and how to call them from your personal startup file
Code: Select all
#!/usr/bin/perl
use strict;
# make sure you installed xinput - not default in some distros
# get output of "xinput list"
my $xinp = `xinput list`;
# get the mice id
(my @mida) = $xinp =~ /^.*\s+id=(\d)\s+\[slave\s+pointer.*$/gm;
foreach my $mid (@mida) {
# now get info for this mouse device
$xinp = `xinput list $mid`;
# get the information in the "Button labels" line
(my $bl) = $xinp =~ /^\s+Button labels:\s(.*)$/gm;
# separate the button descriptions
# if there are any unparenthesized "None" in the file, escape them
$bl =~ s/None/"None"/g;
my @btnt = split(/\"\s\"/, $bl);
# now get the button map
my @bmap = split(' ', `xinput get-button-map $mid`);
# build the command string to be executed
my $cmd = "xinput set-button-map $mid";
for (my $bid = 0; $bid < scalar @bmap; $bid++) {
$cmd .= ' ' . ($btnt[$bid] =~ /.*Wheel.*/ ? '0' : $bmap[$bid]);
}
# finally turn off the wheels :)
`$cmd`;
}
Copy this code, make it executable and modify your startup so that it is executed at each system start.
And bingo, no more annoying wheel scrolling!