Global $key1 = 0
Global $key2 = 0
...
Global $keyn = 0
HotKeySet('{key1}', 'ToggleKey1')
HotKeySet('{key2}', 'ToggleKey2')
...
HotKeySet('{keyn}', 'ToggleKeyn')
HotKeySet('^q', 'Terminate')
Func func1()
if $key1 Then
...
EndIf
EndFunc
Func func2()
if $key1 Then
...
EndIf
EndFunc
....
Func funcn()
if $key1 Then
...
EndIf
EndFunc
While 1
func1()
func2()
...
funcn()
Sleep(10)
WEnd
Func ToggleKey1()
$Key1 = NOT $Key1
EndFunc
Func ToggleKey2()
$Key2 = NOT $Key2
EndFunc
...
Func ToggleKeyn()
$Keyn = NOT $Keyn
EndFunc
Func Terminate()
Exit
EndFunc