Skip to content

Instantly share code, notes, and snippets.

View CGBeast's full-sized avatar

Georgi Hristov CGBeast

View GitHub Profile
; 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