3

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.

1
  • Isn't this a feature of the mouse software, rather than the browser? (I have a Logitech MX Master 3 and this behaviour is configurable in the accompanying "Logitech Options" software.)
    – MrWhite
    Commented May 1, 2021 at 22:59

4 Answers 4

2

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
    }
2

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

0

To reassign a button for a specific program:

  1. Using the mouse that you want to configure, start Microsoft Mouse and Keyboard Center.
  2. Select the app-specific settings
  3. Click Add New button. Select the program that you want
  4. 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?

2
  • It isn't clear whether these instructions address the problem posed by the OP, but in any case these directions are only valid if you're using a microsoft mouse in windows. Commented Aug 20, 2022 at 20:00
  • Dude you just pasted the first google result. This only works for Microsoft mice!
    – Zoomzoom
    Commented Mar 15, 2023 at 14:06
0

I've found the simplest solution to this. Just open the mouse manager software and select Chrome, then specify the buttons. As I'm using Logitech mouse this is how it looks like.

Image

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .