Skip to content

Instantly share code, notes, and snippets.

@asutherland
Created November 28, 2017 02:13
Show Gist options
  • Save asutherland/0c6a65be85fa5d6903f0776acc4c6840 to your computer and use it in GitHub Desktop.
Save asutherland/0c6a65be85fa5d6903f0776acc4c6840 to your computer and use it in GitHub Desktop.
Windows mouse buttons 4 & 5 autohotkey script
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; Raise the window under the mouse without clicking on it.
XButton2::
MouseGetPos, , , id
WinActivate, ahk_id %id%
Return
; Show the windows-tab overview UI
XButton1::
Send #{Tab}
Return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment