Solved Mouse up go previous after set .xmodmap

Hi everyone after I have create .xmodmap and put

Code:
! Disable buttons 8 and 9
pointer = 1 2 3 4 5 6 7 0 0
keycode 166 = NoSymbol
keycode 167 = NoSymbol

The up wheel still go previous all the time

Do someone know if I forget something ????

Thank in advance
 
Just to clarify, did you actually run xmodmap .xmodmap or something similar? I don't think the file would be processed automatically, according to xmodmap(1) (unless lumina has some extra feature in this regard).
 
I do not really understand what you mean.
Do you want to reverse mouse wheel scroll direction?
In this case you might want to modify the perl script I wrote to disable the mouse wheel:

Perl:
#!/usr/bin/env perl
use strict;

# get output of "xinput list"
my $xinp = `xinput list`;
# get the sysmouse id
(my $smid) = $xinp =~ /^.*sysmouse\s+id=(\d)\s+.*$/gm;
# now get info for sysmouse device
$xinp = `xinput list $smid`;
# get the information in the "Button labels" line
(my $bl) = $xinp =~ /^\s+Button labels:\s(.*)$/gm;
# separate the button descriptions
my @btnt = split(/\"\s\"/, $bl);
# now get the button map
my @bmap = split(' ', `xinput get-button-map $smid`);
# build the command string to be executed
my $cmd = "xinput set-button-map $smid";
for (my $bid = 0; $bid < scalar @bmap; $bid++) {
  $cmd .= ' ' . ($btnt[$bid] =~ /.*Wheel.*/ ? '0' : $bmap[$bid]);
}
# finally turn off the wheels :)
`$cmd`;

(I wrote that script to disable the wheel scrolling, because it scrolls by itself due to the cat hair in the optical sensors. Which is very annoying.)
You might adapt the script to swap the wheel scroll directions.

Edit: The code snippet is marked as "Perl", and the coloring shows that the forums' software's syntax coloring is not really functional :)
 
I do not really understand what you mean.
Do you want to reverse mouse wheel scroll direction?
In this case you might want to modify the perl script I wrote to disable the mouse wheel:

Perl:
#!/usr/bin/env perl
use strict;

# get output of "xinput list"
my $xinp = `xinput list`;
# get the sysmouse id
(my $smid) = $xinp =~ /^.*sysmouse\s+id=(\d)\s+.*$/gm;
# now get info for sysmouse device
$xinp = `xinput list $smid`;
# get the information in the "Button labels" line
(my $bl) = $xinp =~ /^\s+Button labels:\s(.*)$/gm;
# separate the button descriptions
my @btnt = split(/\"\s\"/, $bl);
# now get the button map
my @bmap = split(' ', `xinput get-button-map $smid`);
# build the command string to be executed
my $cmd = "xinput set-button-map $smid";
for (my $bid = 0; $bid < scalar @bmap; $bid++) {
  $cmd .= ' ' . ($btnt[$bid] =~ /.*Wheel.*/ ? '0' : $bmap[$bid]);
}
# finally turn off the wheels :)
`$cmd`;

(I wrote that script to disable the wheel scrolling, because it scrolls by itself due to the cat hair in the optical sensors. Which is very annoying.)
You might adapt the script to swap the wheel scroll directions.

Edit: The code snippet is marked as "Perl", and the coloring shows that the forums' software's syntax coloring is not really functional :)

No the problem is

Wheel up = Previous Button on mouse
 
Just to clarify, did you actually run xmodmap .xmodmap or something similar? I don't think the file would be processed automatically, according to xmodmap(1) (unless lumina has some extra feature in this regard).

Code:
# xmodmap .xmodmap
xmodmap:  unable to open file '.xmodmap' for reading
xmodmap:  1 error encountered, aborting.

i think my .xmodmap is in read only or something like this
 
From the prompt I assume you were running as root at this time, so maybe you were in the wrong directory (perhaps root's home folder)? You should run the command as the user running X (which shouldn't be root). If you run ls .xmodmap your terminal should echo .xmodmap. Then running xmodmap .xmodmap should work, too.
Once that works, you can try to run the command automatically at startup. If you use startx, adding
Bash:
xmodmap .xmodmap &
to .xinitrc before the command that runs your window manager or desktop environment might do the trick. Many DEs also have some feature to run commands automatically when starting.
 

From the prompt I assume you were running as root at this time, so maybe you were in the wrong directory (perhaps root's home folder)? You should run the command as the user running X (which shouldn't be root). If you run ls .xmodmap your terminal should echo .xmodmap. Then running xmodmap .xmodmap should work, too.
Once that works, you can try to run the command automatically at startup. If you use startx, adding
Bash:
xmodmap .xmodmap &
to .xinitrc before the command that runs your window manager or desktop environment might do the trick. Many DEs also have some feature to run commands automatically when starting.

Yes i have try in root

I am going to try without root and the .xinitrc
 
From the prompt I assume you were running as root at this time, so maybe you were in the wrong directory (perhaps root's home folder)? You should run the command as the user running X (which shouldn't be root). If you run ls .xmodmap your terminal should echo .xmodmap. Then running xmodmap .xmodmap should work, too.
Once that works, you can try to run the command automatically at startup. If you use startx, adding
Bash:
xmodmap .xmodmap &
to .xinitrc before the command that runs your window manager or desktop environment might do the trick. Many DEs also have some feature to run commands automatically when starting.

oh nice this is work ._. ok my problem was i didn't run it at normal user

And my .xmodmap was right with a X not a x

after put it in the .xinitrc everything work smooth thank you very much :O
 
Back
Top