Created
April 6, 2017 22:12
-
-
Save replete/9be1ac530503168636536ddf0ccc7463 to your computer and use it in GitHub Desktop.
AutoHotkey - Browser Gestures (Swipe left/right navigate back/forward, middle-click like firefox)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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