Skip to content

Instantly share code, notes, and snippets.

@hensm
Created October 2, 2017 19:44
Show Gist options
  • Save hensm/3f268ae2c30589ca2c9a1f2d8f031268 to your computer and use it in GitHub Desktop.
Save hensm/3f268ae2c30589ca2c9a1f2d8f031268 to your computer and use it in GitHub Desktop.
CoordMode, Mouse, Client
GroupAdd, Browsers, ahk_class MozillaWindowClass
GroupAdd, Browsers, ahk_class Chrome_WidgetWin_1
return
IsWithinTabBar() {
yOffset := 0
height := 30
MouseGetPos, x, y
WinGetPos, ,, width
return ((x > 0) ; left
and (x < width) ; right
and (y > yOffset) ; top
and (y < yOffset + height)) ; bottom
}
#IfWinActive ahk_group Browsers
~WheelUp::
if IsWithinTabBar() {
Send, ^+{Tab}
}
return
~WheelDown::
if IsWithinTabBar() {
Send, ^{Tab}
}
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment