Step-by-Step Guide to Disable Mouse Buttons 4 & 5 in Google Chrome

Modern mouse hardware comes with more than 3 buttons, such as middle click, side-forward and side-backward buttons. But, in some cases, if you don’t use them too often, it’s beneficial to disable them. Now let’s learn how to do that.

Step-by-Step Guide

1. Install Autohotkey

First, you will need to install Autohotkey software. It available for both Windows and MacOS. Autohotkey is a powerful, open source scripting language used to automate keyboard and mouse commands.

2. Write a Script to Disable Mouse Buttons 4 & 5

Now, open notepad and start typing the script below -

; Disable Mouse Button 4 & 5

3. Save the Script with AHK Extension

Once the script has been written, save it as disable-mouse.ahk in a folder of your choice.

4. Double-click the Script to Execute It

Now, double-click the file to execute Autohotkey script. As soon as executed, the script will disable mouse buttons 4 & 5 in Google Chrome.


How to disable Mouse Button 4 & 5 in Chrome?

To disable Mouse Button 4 & 5 in Chrome, you’ll need to install Autohotkey and write a script to disable them. Once the script is created and saved with the AHK extension, double-click the file to execute the script.

How to add custom keyboard shortcuts to a website?

You can add custom keyboard shortcuts to a website using Autohotkey. You can make use of Autohotkey's Hotkey command to define and execute custom keyboard shortcuts on any website.

How to find a keyboard shortcut’s code?

You can find a keyboard shortcut’s code in any of the autohotkey documentation’s. The documentation details almost all the Windows keyboard shortcut codes.

Can I disable my laptop's touchpad or trackpad?

Yes, you can easily disable your laptop's touchpad or trackpad using Autohotkey. You’ll need to use a script like this one -

; This will disable the trackpad
#ifWinActive ahk_class Chrome

Save the script with the AHK extension in a folder and execute it.

Can I disable mouse buttons using Autohotkey?

Yes, you can easily disable mouse buttons using Autohotkey. To disable buttons 4 & 5 you can use the script above. For any other buttons, you can modify the script accordingly.

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.