This file contains 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
; With the help of this code when I double tap Q within 0.2 seconds (200 miliseconds) the script will send contrl + ald + shift + F12 instead of Q. | |
#if WinActive("ahk_class Notepad") ;Replace Favorite_Program with the class of your desired program) | |
$q:: ;Replace Q with the key you want to double tap | |
t := A_PriorHotkey == A_ThisHotkey && A_TimeSincePriorHotkey < 200 ? "off" : -200 | |
;Replace 200 with a lower number if you want a smaller listening window or a higher number for a bigger listening window. | |
settimer, tappedkey_q, %t% | |
if (t == "off") | |
goto double_q |