Skip to content

Instantly share code, notes, and snippets.

@eatonphil
Last active July 25, 2020 20:36
Embed
What would you like to do?
Autohotkey defaults for Windows 10 on Surface Book 2
; Make Caps -> Esc
Capslock::Esc
; Make Ctrl+Windows+Alt+Left -> media backward
#^!Left::Send {Media_Prev}
; Make Ctrl+Windows+Alt+Right -> media forward
#^!Right::Send {Media_Next}
; Give back a right control
AppsKey::RCtrl
; Source: https://www.reddit.com/r/Dell/comments/4mzerg/psa_optimizing_autohotkey_with_precision_touchpad/
;;-----swipe left for backward navigation---------------
WheelRight::
winc_pressesR += 1
SetTimer, Whright, 400 ; Wait for more presses within a 400 millisecond window.
return
Whright:
SetTimer, Whright, off ; Disable timer after first time its called.
if winc_pressesR >= 16 ; The key was pressed once or more.
{
SendInput, !{Left} ; Send alt + left for back button (in Chrome at least)
}
; Regardless of which action above was triggered, reset the count to prepare for the next series of presses:
winc_pressesR = 0
return
;-----------------------------------------------
;;-----swipe right for forward navigation---------------
WheelLeft::
winc_pressesL += 1
SetTimer, Whleft, 400 ; Wait for more presses within a 400 millisecond window.
return
Whleft:
SetTimer, Whleft, off ; Disable timer after first time its called.
if winc_pressesL >= 16 ; The key was pressed once or more.
{
SendInput, !{Right} ; Send alt + left for forward button (in Chrome at least)
}
; Regardless of which action above was triggered, reset the count to prepare for the next series of presses:
winc_pressesL = 0
return
;-----------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment