I need a way to disable the forward/back functions set automatically on mouse button 4 and 5. I want to disable it in Chrome, but I still want it to be registered by other programs when using chrome. Thus I cannot use the software x-mouse.
Firefox has this simple trick that worked for me: How to disable mouse back and forward shortcuts?
Now I want something for chrome.
13 Answers
To reassign a button for a specific program:
- Using the mouse that you want to configure, start Microsoft Mouse and Keyboard Center.
- Select the app-specific settings
- Click Add New button. Select the program that you want
- If the program that you want is not on the list, click Manually Add a Program at the bottom, select the program. In the button command list, select a command.
Found at How do I reassign mouse buttons?
I wrote a small autohotkey script you can leave running in the background to lose focus of the Chrome (or Firefox) window when Mouse3 or Mouse4 are used:
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
SetTitleMatchMode, RegEx
#IfWinActive Google Chrome|Mozilla Firefox
$XButton1:: { prev:=WinActive("A") WinActivate, ahk_class Shell_TrayWnd KeyWait, XButton1 WinActivate, ahk_id %prev% return }
#IfWinActive Google Chrome|Mozilla Firefox
$XButton2:: { prev:=WinActive("A") WinActivate, ahk_class Shell_TrayWnd KeyWait, XButton2 WinActivate, ahk_id %prev% return } There are some extensions that might help to achieve this without any external crutches, I don't think there's any other way to work around this in Chrome