How to disable the Forward/Back buttons on my mouse
Clash Royale CLAN TAG#URR8PPP
up vote
28
down vote
favorite
My mouse has an unfortunate feature. On the left side, right where my thumb sits ever so gently when I'm using it, there are two buttons that are so sensitive a mere brush will make them click.
I'm talking of course about the pesky forward/back buttons which, if pressed in a browser, can make watching that hour-long youtube video that much harder. Is there a way for me to disable them? Would this be handled by X?
xorg mouse
add a comment |Â
up vote
28
down vote
favorite
My mouse has an unfortunate feature. On the left side, right where my thumb sits ever so gently when I'm using it, there are two buttons that are so sensitive a mere brush will make them click.
I'm talking of course about the pesky forward/back buttons which, if pressed in a browser, can make watching that hour-long youtube video that much harder. Is there a way for me to disable them? Would this be handled by X?
xorg mouse
2
I'm almost sure that you can turn it off usingxinput
, but I don't know details...
â pbm
Sep 12 '11 at 15:10
This question and the answer also applies to back / forward buttons on keyboards, e.g. on Thinkpad keyboard
â Daniel S. Sterling
Mar 20 '13 at 13:32
add a comment |Â
up vote
28
down vote
favorite
up vote
28
down vote
favorite
My mouse has an unfortunate feature. On the left side, right where my thumb sits ever so gently when I'm using it, there are two buttons that are so sensitive a mere brush will make them click.
I'm talking of course about the pesky forward/back buttons which, if pressed in a browser, can make watching that hour-long youtube video that much harder. Is there a way for me to disable them? Would this be handled by X?
xorg mouse
My mouse has an unfortunate feature. On the left side, right where my thumb sits ever so gently when I'm using it, there are two buttons that are so sensitive a mere brush will make them click.
I'm talking of course about the pesky forward/back buttons which, if pressed in a browser, can make watching that hour-long youtube video that much harder. Is there a way for me to disable them? Would this be handled by X?
xorg mouse
xorg mouse
asked Sep 12 '11 at 14:38
n0pe
5,83254496
5,83254496
2
I'm almost sure that you can turn it off usingxinput
, but I don't know details...
â pbm
Sep 12 '11 at 15:10
This question and the answer also applies to back / forward buttons on keyboards, e.g. on Thinkpad keyboard
â Daniel S. Sterling
Mar 20 '13 at 13:32
add a comment |Â
2
I'm almost sure that you can turn it off usingxinput
, but I don't know details...
â pbm
Sep 12 '11 at 15:10
This question and the answer also applies to back / forward buttons on keyboards, e.g. on Thinkpad keyboard
â Daniel S. Sterling
Mar 20 '13 at 13:32
2
2
I'm almost sure that you can turn it off using
xinput
, but I don't know details...â pbm
Sep 12 '11 at 15:10
I'm almost sure that you can turn it off using
xinput
, but I don't know details...â pbm
Sep 12 '11 at 15:10
This question and the answer also applies to back / forward buttons on keyboards, e.g. on Thinkpad keyboard
â Daniel S. Sterling
Mar 20 '13 at 13:32
This question and the answer also applies to back / forward buttons on keyboards, e.g. on Thinkpad keyboard
â Daniel S. Sterling
Mar 20 '13 at 13:32
add a comment |Â
3 Answers
3
active
oldest
votes
up vote
36
down vote
accepted
Start the program xev
in a terminal. Move the mouse inside the xev
window; you'll see a lot of stuff scroll by. Press each button in turn. Then switch back to the terminal window and press Ctrl+C. xev
shows a description of each input event, in particular ButtonPress
and ButtonRelease
for mouse clicks (you'll also see a number of MotionNotify
for mouse movements and other events).
It's likely that your forward and back buttons are mapped to mouse buttons, maybe buttons 8 and 9:
ButtonPress event, serial 29, synthetic NO, window 0x2e00001,
root 0x105, subw 0x0, time 2889100159, (166,67), root:(1769,98),
state 0x0, button 8, same_screen YES
If that's the case, remap these buttons to a different action in your browser; or to disable the buttons altogether, put these lines in a file called ~/.Xmodmap
:
! Disable buttons 8 and 9
pointer = 1 2 3 4 5 6 7 0 0
Test it with the command xmodmap ~/.Xmodmap
. Most desktop environments and window managers run this command automatically when you log in; if yours doesn't, arrange for it to run when X starts.
It's also possible that your mouse sends a keyboard event when you press these buttons:
KeyPress event, serial 32, synthetic NO, window 0x2e00001,
root 0x105, subw 0x0, time 2889100963, (957,357), root:(2560,388),
state 0x0, keycode 166 (keysym 0x1008ff26, XF86Back), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
In that case, put lines like these in ~/.Xmodmap
:
keycode 166 = NoSymbol
keycode 167 = NoSymbol
No_Symbol generated an error for me on Fedora 18: bad keysym name 'No_Symbol' in keysym list -- but using NoSymbol instead works fine
â Daniel S. Sterling
Mar 20 '13 at 13:33
Thank you both for the question and the answer. Incidentally, to reduce the insanity of thexev
output, just pipe it through grep:xev | grep -A2 ButtonPress
; this will leave all the mouse motion events, focus events, etc. and just show theButtonPress
events, which is all you need here.
â Lambart
Sep 19 '14 at 18:50
If you want to disable a button that annoys you and, in the same time, keep its functionnality, you can disable the button, as @Gilles showed, and transfer its functionnality to another : pointer = 1 3 0 will disable my 3rd mouse button (the right one) and set the second (the middle one) to behave like the 3rd. Useful for a vertical mouse in my case.
â SR_
Nov 6 '17 at 10:17
add a comment |Â
up vote
1
down vote
You could use xev
to find which key maps the button maps to and use the code below (in $HOME/.xsessionrc) to map it to something you are not using.
xmodmap -e 'keycode THE_CODE_HERE = XF86Launch1'
Alternatively, you should be able to do that from a GUI of you use Gnome/KDE or any other modern desktops.
Yet another option would be to hack the xorg.conf to remove the button definitions.
add a comment |Â
up vote
0
down vote
Can be done with xorg config file
Here is an example that disable horizontal scroll (Save the new file and reboot)
nano /etc/X11/xorg.conf.d/40-libinput-mouse-left-right.conf
Section "InputClass"
Identifier "Logitech catchall"
MatchIsPointer "on"
Driver "libinput"
Option "HorizontalScrolling" "false"
EndSection
Other useful commands
xinput list
xinput list-props 15
Now for this question xorg config file can be used to remap button here is an example
Section "InputClass"
# ...
Option "ButtonMapping" "1 9 3 4 5 6 7 8 2"
# ...
EndSection
add a comment |Â
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
36
down vote
accepted
Start the program xev
in a terminal. Move the mouse inside the xev
window; you'll see a lot of stuff scroll by. Press each button in turn. Then switch back to the terminal window and press Ctrl+C. xev
shows a description of each input event, in particular ButtonPress
and ButtonRelease
for mouse clicks (you'll also see a number of MotionNotify
for mouse movements and other events).
It's likely that your forward and back buttons are mapped to mouse buttons, maybe buttons 8 and 9:
ButtonPress event, serial 29, synthetic NO, window 0x2e00001,
root 0x105, subw 0x0, time 2889100159, (166,67), root:(1769,98),
state 0x0, button 8, same_screen YES
If that's the case, remap these buttons to a different action in your browser; or to disable the buttons altogether, put these lines in a file called ~/.Xmodmap
:
! Disable buttons 8 and 9
pointer = 1 2 3 4 5 6 7 0 0
Test it with the command xmodmap ~/.Xmodmap
. Most desktop environments and window managers run this command automatically when you log in; if yours doesn't, arrange for it to run when X starts.
It's also possible that your mouse sends a keyboard event when you press these buttons:
KeyPress event, serial 32, synthetic NO, window 0x2e00001,
root 0x105, subw 0x0, time 2889100963, (957,357), root:(2560,388),
state 0x0, keycode 166 (keysym 0x1008ff26, XF86Back), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
In that case, put lines like these in ~/.Xmodmap
:
keycode 166 = NoSymbol
keycode 167 = NoSymbol
No_Symbol generated an error for me on Fedora 18: bad keysym name 'No_Symbol' in keysym list -- but using NoSymbol instead works fine
â Daniel S. Sterling
Mar 20 '13 at 13:33
Thank you both for the question and the answer. Incidentally, to reduce the insanity of thexev
output, just pipe it through grep:xev | grep -A2 ButtonPress
; this will leave all the mouse motion events, focus events, etc. and just show theButtonPress
events, which is all you need here.
â Lambart
Sep 19 '14 at 18:50
If you want to disable a button that annoys you and, in the same time, keep its functionnality, you can disable the button, as @Gilles showed, and transfer its functionnality to another : pointer = 1 3 0 will disable my 3rd mouse button (the right one) and set the second (the middle one) to behave like the 3rd. Useful for a vertical mouse in my case.
â SR_
Nov 6 '17 at 10:17
add a comment |Â
up vote
36
down vote
accepted
Start the program xev
in a terminal. Move the mouse inside the xev
window; you'll see a lot of stuff scroll by. Press each button in turn. Then switch back to the terminal window and press Ctrl+C. xev
shows a description of each input event, in particular ButtonPress
and ButtonRelease
for mouse clicks (you'll also see a number of MotionNotify
for mouse movements and other events).
It's likely that your forward and back buttons are mapped to mouse buttons, maybe buttons 8 and 9:
ButtonPress event, serial 29, synthetic NO, window 0x2e00001,
root 0x105, subw 0x0, time 2889100159, (166,67), root:(1769,98),
state 0x0, button 8, same_screen YES
If that's the case, remap these buttons to a different action in your browser; or to disable the buttons altogether, put these lines in a file called ~/.Xmodmap
:
! Disable buttons 8 and 9
pointer = 1 2 3 4 5 6 7 0 0
Test it with the command xmodmap ~/.Xmodmap
. Most desktop environments and window managers run this command automatically when you log in; if yours doesn't, arrange for it to run when X starts.
It's also possible that your mouse sends a keyboard event when you press these buttons:
KeyPress event, serial 32, synthetic NO, window 0x2e00001,
root 0x105, subw 0x0, time 2889100963, (957,357), root:(2560,388),
state 0x0, keycode 166 (keysym 0x1008ff26, XF86Back), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
In that case, put lines like these in ~/.Xmodmap
:
keycode 166 = NoSymbol
keycode 167 = NoSymbol
No_Symbol generated an error for me on Fedora 18: bad keysym name 'No_Symbol' in keysym list -- but using NoSymbol instead works fine
â Daniel S. Sterling
Mar 20 '13 at 13:33
Thank you both for the question and the answer. Incidentally, to reduce the insanity of thexev
output, just pipe it through grep:xev | grep -A2 ButtonPress
; this will leave all the mouse motion events, focus events, etc. and just show theButtonPress
events, which is all you need here.
â Lambart
Sep 19 '14 at 18:50
If you want to disable a button that annoys you and, in the same time, keep its functionnality, you can disable the button, as @Gilles showed, and transfer its functionnality to another : pointer = 1 3 0 will disable my 3rd mouse button (the right one) and set the second (the middle one) to behave like the 3rd. Useful for a vertical mouse in my case.
â SR_
Nov 6 '17 at 10:17
add a comment |Â
up vote
36
down vote
accepted
up vote
36
down vote
accepted
Start the program xev
in a terminal. Move the mouse inside the xev
window; you'll see a lot of stuff scroll by. Press each button in turn. Then switch back to the terminal window and press Ctrl+C. xev
shows a description of each input event, in particular ButtonPress
and ButtonRelease
for mouse clicks (you'll also see a number of MotionNotify
for mouse movements and other events).
It's likely that your forward and back buttons are mapped to mouse buttons, maybe buttons 8 and 9:
ButtonPress event, serial 29, synthetic NO, window 0x2e00001,
root 0x105, subw 0x0, time 2889100159, (166,67), root:(1769,98),
state 0x0, button 8, same_screen YES
If that's the case, remap these buttons to a different action in your browser; or to disable the buttons altogether, put these lines in a file called ~/.Xmodmap
:
! Disable buttons 8 and 9
pointer = 1 2 3 4 5 6 7 0 0
Test it with the command xmodmap ~/.Xmodmap
. Most desktop environments and window managers run this command automatically when you log in; if yours doesn't, arrange for it to run when X starts.
It's also possible that your mouse sends a keyboard event when you press these buttons:
KeyPress event, serial 32, synthetic NO, window 0x2e00001,
root 0x105, subw 0x0, time 2889100963, (957,357), root:(2560,388),
state 0x0, keycode 166 (keysym 0x1008ff26, XF86Back), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
In that case, put lines like these in ~/.Xmodmap
:
keycode 166 = NoSymbol
keycode 167 = NoSymbol
Start the program xev
in a terminal. Move the mouse inside the xev
window; you'll see a lot of stuff scroll by. Press each button in turn. Then switch back to the terminal window and press Ctrl+C. xev
shows a description of each input event, in particular ButtonPress
and ButtonRelease
for mouse clicks (you'll also see a number of MotionNotify
for mouse movements and other events).
It's likely that your forward and back buttons are mapped to mouse buttons, maybe buttons 8 and 9:
ButtonPress event, serial 29, synthetic NO, window 0x2e00001,
root 0x105, subw 0x0, time 2889100159, (166,67), root:(1769,98),
state 0x0, button 8, same_screen YES
If that's the case, remap these buttons to a different action in your browser; or to disable the buttons altogether, put these lines in a file called ~/.Xmodmap
:
! Disable buttons 8 and 9
pointer = 1 2 3 4 5 6 7 0 0
Test it with the command xmodmap ~/.Xmodmap
. Most desktop environments and window managers run this command automatically when you log in; if yours doesn't, arrange for it to run when X starts.
It's also possible that your mouse sends a keyboard event when you press these buttons:
KeyPress event, serial 32, synthetic NO, window 0x2e00001,
root 0x105, subw 0x0, time 2889100963, (957,357), root:(2560,388),
state 0x0, keycode 166 (keysym 0x1008ff26, XF86Back), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
In that case, put lines like these in ~/.Xmodmap
:
keycode 166 = NoSymbol
keycode 167 = NoSymbol
edited Mar 20 '13 at 13:40
answered Sep 13 '11 at 6:20
Gilles
517k12310311559
517k12310311559
No_Symbol generated an error for me on Fedora 18: bad keysym name 'No_Symbol' in keysym list -- but using NoSymbol instead works fine
â Daniel S. Sterling
Mar 20 '13 at 13:33
Thank you both for the question and the answer. Incidentally, to reduce the insanity of thexev
output, just pipe it through grep:xev | grep -A2 ButtonPress
; this will leave all the mouse motion events, focus events, etc. and just show theButtonPress
events, which is all you need here.
â Lambart
Sep 19 '14 at 18:50
If you want to disable a button that annoys you and, in the same time, keep its functionnality, you can disable the button, as @Gilles showed, and transfer its functionnality to another : pointer = 1 3 0 will disable my 3rd mouse button (the right one) and set the second (the middle one) to behave like the 3rd. Useful for a vertical mouse in my case.
â SR_
Nov 6 '17 at 10:17
add a comment |Â
No_Symbol generated an error for me on Fedora 18: bad keysym name 'No_Symbol' in keysym list -- but using NoSymbol instead works fine
â Daniel S. Sterling
Mar 20 '13 at 13:33
Thank you both for the question and the answer. Incidentally, to reduce the insanity of thexev
output, just pipe it through grep:xev | grep -A2 ButtonPress
; this will leave all the mouse motion events, focus events, etc. and just show theButtonPress
events, which is all you need here.
â Lambart
Sep 19 '14 at 18:50
If you want to disable a button that annoys you and, in the same time, keep its functionnality, you can disable the button, as @Gilles showed, and transfer its functionnality to another : pointer = 1 3 0 will disable my 3rd mouse button (the right one) and set the second (the middle one) to behave like the 3rd. Useful for a vertical mouse in my case.
â SR_
Nov 6 '17 at 10:17
No_Symbol generated an error for me on Fedora 18: bad keysym name 'No_Symbol' in keysym list -- but using NoSymbol instead works fine
â Daniel S. Sterling
Mar 20 '13 at 13:33
No_Symbol generated an error for me on Fedora 18: bad keysym name 'No_Symbol' in keysym list -- but using NoSymbol instead works fine
â Daniel S. Sterling
Mar 20 '13 at 13:33
Thank you both for the question and the answer. Incidentally, to reduce the insanity of the
xev
output, just pipe it through grep: xev | grep -A2 ButtonPress
; this will leave all the mouse motion events, focus events, etc. and just show the ButtonPress
events, which is all you need here.â Lambart
Sep 19 '14 at 18:50
Thank you both for the question and the answer. Incidentally, to reduce the insanity of the
xev
output, just pipe it through grep: xev | grep -A2 ButtonPress
; this will leave all the mouse motion events, focus events, etc. and just show the ButtonPress
events, which is all you need here.â Lambart
Sep 19 '14 at 18:50
If you want to disable a button that annoys you and, in the same time, keep its functionnality, you can disable the button, as @Gilles showed, and transfer its functionnality to another : pointer = 1 3 0 will disable my 3rd mouse button (the right one) and set the second (the middle one) to behave like the 3rd. Useful for a vertical mouse in my case.
â SR_
Nov 6 '17 at 10:17
If you want to disable a button that annoys you and, in the same time, keep its functionnality, you can disable the button, as @Gilles showed, and transfer its functionnality to another : pointer = 1 3 0 will disable my 3rd mouse button (the right one) and set the second (the middle one) to behave like the 3rd. Useful for a vertical mouse in my case.
â SR_
Nov 6 '17 at 10:17
add a comment |Â
up vote
1
down vote
You could use xev
to find which key maps the button maps to and use the code below (in $HOME/.xsessionrc) to map it to something you are not using.
xmodmap -e 'keycode THE_CODE_HERE = XF86Launch1'
Alternatively, you should be able to do that from a GUI of you use Gnome/KDE or any other modern desktops.
Yet another option would be to hack the xorg.conf to remove the button definitions.
add a comment |Â
up vote
1
down vote
You could use xev
to find which key maps the button maps to and use the code below (in $HOME/.xsessionrc) to map it to something you are not using.
xmodmap -e 'keycode THE_CODE_HERE = XF86Launch1'
Alternatively, you should be able to do that from a GUI of you use Gnome/KDE or any other modern desktops.
Yet another option would be to hack the xorg.conf to remove the button definitions.
add a comment |Â
up vote
1
down vote
up vote
1
down vote
You could use xev
to find which key maps the button maps to and use the code below (in $HOME/.xsessionrc) to map it to something you are not using.
xmodmap -e 'keycode THE_CODE_HERE = XF86Launch1'
Alternatively, you should be able to do that from a GUI of you use Gnome/KDE or any other modern desktops.
Yet another option would be to hack the xorg.conf to remove the button definitions.
You could use xev
to find which key maps the button maps to and use the code below (in $HOME/.xsessionrc) to map it to something you are not using.
xmodmap -e 'keycode THE_CODE_HERE = XF86Launch1'
Alternatively, you should be able to do that from a GUI of you use Gnome/KDE or any other modern desktops.
Yet another option would be to hack the xorg.conf to remove the button definitions.
answered Sep 12 '11 at 16:23
Sardathrion
2,42542248
2,42542248
add a comment |Â
add a comment |Â
up vote
0
down vote
Can be done with xorg config file
Here is an example that disable horizontal scroll (Save the new file and reboot)
nano /etc/X11/xorg.conf.d/40-libinput-mouse-left-right.conf
Section "InputClass"
Identifier "Logitech catchall"
MatchIsPointer "on"
Driver "libinput"
Option "HorizontalScrolling" "false"
EndSection
Other useful commands
xinput list
xinput list-props 15
Now for this question xorg config file can be used to remap button here is an example
Section "InputClass"
# ...
Option "ButtonMapping" "1 9 3 4 5 6 7 8 2"
# ...
EndSection
add a comment |Â
up vote
0
down vote
Can be done with xorg config file
Here is an example that disable horizontal scroll (Save the new file and reboot)
nano /etc/X11/xorg.conf.d/40-libinput-mouse-left-right.conf
Section "InputClass"
Identifier "Logitech catchall"
MatchIsPointer "on"
Driver "libinput"
Option "HorizontalScrolling" "false"
EndSection
Other useful commands
xinput list
xinput list-props 15
Now for this question xorg config file can be used to remap button here is an example
Section "InputClass"
# ...
Option "ButtonMapping" "1 9 3 4 5 6 7 8 2"
# ...
EndSection
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Can be done with xorg config file
Here is an example that disable horizontal scroll (Save the new file and reboot)
nano /etc/X11/xorg.conf.d/40-libinput-mouse-left-right.conf
Section "InputClass"
Identifier "Logitech catchall"
MatchIsPointer "on"
Driver "libinput"
Option "HorizontalScrolling" "false"
EndSection
Other useful commands
xinput list
xinput list-props 15
Now for this question xorg config file can be used to remap button here is an example
Section "InputClass"
# ...
Option "ButtonMapping" "1 9 3 4 5 6 7 8 2"
# ...
EndSection
Can be done with xorg config file
Here is an example that disable horizontal scroll (Save the new file and reboot)
nano /etc/X11/xorg.conf.d/40-libinput-mouse-left-right.conf
Section "InputClass"
Identifier "Logitech catchall"
MatchIsPointer "on"
Driver "libinput"
Option "HorizontalScrolling" "false"
EndSection
Other useful commands
xinput list
xinput list-props 15
Now for this question xorg config file can be used to remap button here is an example
Section "InputClass"
# ...
Option "ButtonMapping" "1 9 3 4 5 6 7 8 2"
# ...
EndSection
answered 24 mins ago
intika
1695
1695
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f20550%2fhow-to-disable-the-forward-back-buttons-on-my-mouse%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
2
I'm almost sure that you can turn it off using
xinput
, but I don't know details...â pbm
Sep 12 '11 at 15:10
This question and the answer also applies to back / forward buttons on keyboards, e.g. on Thinkpad keyboard
â Daniel S. Sterling
Mar 20 '13 at 13:32