Created
March 3, 2017 12:47
-
-
Save Denyerec/130dc774cec35c63678e331e9203a9e9 to your computer and use it in GitHub Desktop.
AHK Bind for Tap/Doubletap keybinding
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
;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