I need to make a custom hotkey for the alt-tab function. I'm doing this with SendInput
by sending the corresponding keys, and it works fine.
However, if a hotkey already includes the alt key, the program only needs to press and release tab; but doing so causes the alt-tab menu to get stuck on screen even, and the only way to make it go away is to close my program. How could that possibly happen, and what does closing my program have to do with the menu disappearing?
On the other hand, sending (alt down)(tab down)(tab up)(alt up) keys regardless of whether alt is already down works in all cases, but I can't rely on this behavior for other reasons.
I'm using WinXP if that helps, I haven't tried it on the Win7 computer yet.
I don't know if this related, but Alt+Ctrl+Tab causes the menu to stuck, just like if Alt would stick when press Alt+Tab. So may be you are sending Ctrl signal somehow.