Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
AutoHotkey - Browser Gestures (Swipe left/right navigate back/forward, middle-click like firefox)
GroupAdd, Browsers, ahk_class Chrome_WidgetWin_1
GroupAdd, Browsers, ahk_class MozillaWindowClass
GroupAdd, Browsers, ahk_class ApplicationFrameWindow
#MaxHotkeysPerInterval 219
;-----three finger tap for middle click-----
+^#F22::
SendInput, {MButton}
return
#IfWinActive ahk_group Browsers
;-----four finger tap for browser tab switching-----
+^#F24::SendInput, {ctrldown}{tab}{ctrlup}
return
;-----swipe left for backward navigation-----
WheelLeft::
winc_pressesL += 1
SetTimer, Whleft, 50
return
Whleft:
SetTimer, Whleft, off
if winc_pressesL >= 5
{
SendInput, {Browser_Back}
}
winc_pressesL = 0
return
;-----swipe right for forward navigation-----
WheelRight::
winc_pressesR += 1
SetTimer, WhRight, 50
return
Whright:
SetTimer, Whright, off
if winc_pressesR >= 5
{
SendInput, {Browser_Forward}
}
winc_pressesR = 0
return
#IfWinActive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.