Skip to content

Instantly share code, notes, and snippets.

@Denyerec
Created March 3, 2017 12:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Denyerec/130dc774cec35c63678e331e9203a9e9 to your computer and use it in GitHub Desktop.
Save Denyerec/130dc774cec35c63678e331e9203a9e9 to your computer and use it in GitHub Desktop.
AHK Bind for Tap/Doubletap keybinding
;Tap 0 - Select RGB Layer (Ctrl+2)
;Double tap 0 - Select Layermask (Ctrl + \ )
Numpad0::
if numzero_presses > 0 ; SetTimer already started, so we log the keypress instead.
{
numzero_presses += 1
return
}
; Otherwise, this is the first press of a new series. Set count to 1 and start timer
numzero_presses = 1
SetTimer, NumZeroPresses, -300 ; Wait for more presses within a 300 millisecond window.
return
NumZeroPresses:
IfEqual, numzero_presses, 1, Send, ^2
IfEqual, numzero_presses, 2, Send, ^{\}
numzero_presses = 0
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment