Code: Select all
Q::ExitApp
#If (Test() = 1)
~LButton Up::OutputDebug, TEST LBUTTON UP %A_ThisHotkey% ; the first hotkey line
#If
LButton Up::OutputDebug, NORMAL LBUTTON UP %A_ThisHotkey% ; the second hotkey line
Test()
{
Return 0
}
In both cases the hotkey that is actually executed is the second one. The hotkey that actually fires, as I understand it, is "LButton Up", or else this second hotkey line would not be executed. Yet when this hotkey "LButton Up" is fired, the value of A_ThisHotkey is acutally "~LButton Up" (in the original unchanged script).
Why? And why would the presence of a different hotkey specification change the value seen by A_ThisHotkey? How should I think of the meaning of "~"? I can program around this but I don't actually understand why I am seeing a ~ value in A_ThisHotkey for a hotkey that is not defined with a ~.