Windows: How to swap Mouse Buttons: Right-Click, Middle-Click

By Xah Lee. Date: . Last updated: .

Swap your right-button and middle-button's actions.

logitech anywhere 2 mouse
see Logitech MX Master Wireless Mouse

Gaming mouse usually do not let you reprogram the left and right buttons. However, you can set a extra button to do middle click.

For mouse with lots buttons, see Mouse Reviews

Microsoft Windows

Use AutoHotkey to swap buttons.

; AutoHotkey code to swap middle and right buttons

Create this file, save it as swap_buttons.ahk, and you need to tell AutoHotkey to start it when your computer starts.

For how, see: AutoHotkey Tutorial.


Linux: How to Swap Mouse Buttons.

Why do you want to swap the buttons?

Why Swap Mouse Middle-Click and Right-Click?

Windows Keyboard How-To

  1. Windows Keyboard Software Guide
  2. AutoHotkey Tutorial
  3. AutoHotkey Syntax
  4. AutoHotkey Scripts
  5. Swap CapsLock, Alt, Control
  6. Toggle Max Window
  7. Disable CapsLock, Win Key
  8. Window Key Shortcuts
  9. Microsoft Windows Key Shortcuts
  10. cmd Console Shortcuts
  11. Swap Mouse Buttons

If you have a question, put $5 at patreon and message me.