Code: Select all
#If GetKeyState("CapsLock", "T")
{
Launch_App2 & e:: ;
If GetKeyState("Shift", "p")
Send {U+011B}
else
Send {U+011A}
return
}
#If NOT GetKeyState("CapsLock", "T")
{
Launch_App2 & e:: ;
If GetKeyState("Shift", "p")
Send {U+011A}
else
Send {U+011B}
return
}
What I want to do is that when I press (not hold) "Launch_App2" and after that in some short time (like 0.5 seconds) I press down e-key it does what I want. It's basically a dead key that expires after some time.
My idea was to have a value that is initally zero, when I press then "Launch_App2" it sets it to 1 for half a second and then back to 0. Then I would have a simple if-else statement that would check if value is 0 or 1 and send "e" or modified e.
I tried some things but nothing worked. Could someone help me with this?