Alright I think this is the final script....
Normally all keys behave as usual unless you press F6, then during 3 seconds you can use the hotkeys. As soon as you used a hotkey the behaviour falls back to normal again (the 3 seconds are only in case you do not press a hotkey). When you press F6 twice it will send F6. Let me know if you found an easier solution as this is relativey complex.
FormatTime, DateRef, %TimeNow%, yyyyMMdd ; Store current date in variable DateRef
MyLogFile = %A_ScriptDir%\LogFile-%DateRef%.txt ; Define the name of the log file for today.
FormatTime, TimeAbsolute, %TimeNow%, HH:mm:ss
FileAppend, | %TimeAbsolute% | Your hotkey and possibly in which application`n`r,%MyLogFile% ; Write logfile
SpecialF6:=1
Suspend, On
Return
$F6::
Suspend, Permit
If SpecialF6
{
Suspend, Off
ToolTip Hotkeys On for 3 seconds,A_ScreenWidth/2-50,0
SpecialF6:=0
SetTimer, SuspendOn, 3000
Return
}
else
{
Send, {F6}
MyText = F6
Gosub, WriteClose
}
Return
SuspendOn:
Suspend, On
SetTimer, SuspendOn, Off
ToolTip
SpecialF6:=1
return
F5::
Run explorer
MyText = F5 Run Explorer
Gosub, WriteClose
Return
t::
Run notepad
MyText = t Run Notepad
Gosub, WriteClose
Return
!+5::
Run cmd
MyText = Alt Shift 5 Run Command
Gosub, WriteClose
return
WriteClose:
Suspend, On
SetTimer, SuspendOn, Off
FormatTime, TimeAbsolute, %TimeNow%, HH:mm:ss
ToolTip
SpecialF6:=1
FileAppend, | %TimeAbsolute% | %MyText%`n`r,%MyLogFile% ; Write logfile
Exit