1) While simple in nature, the logic of this post is difficult to follow for those of us without an AltGr keyboard to just go test with. I speak for myself at any rate... for comprehension sake, it may help to clarify which two line script you are talking about, followed by a list of what keys you press (and in what order), followed by a list of what results you get. Then list the next script, keys and results. Or maybe others don't need this, but it was a bit difficult for me to follow even though I believe you have all the critical information listed.
2) Have you looked at hotkey reassignments in the help files? I noticed two things you may want to play with. First is the use of * as a modifier. Second is the use of 'Up' to trigger on an upstroke to send a different upstroke (i.e., send an upstroke for a different modifier). Look at the LWin redefinition listed under Hotkeys in the help file:
*LWin::Send {LControl Down}
*LWin Up::Send {LControl Up}
3) Things get stuck sometimes and when that happens you can sometimes work around it by sending 'Up' commands even if the key is already up. Technically it may not be needed, but sometimes it works (and sometimes it doesn't).
4) It may (or may not) serve to look in the key history list via the View menu. Often you can find why things get stuck or why they misfire by looking at the order keys are processed in (i.e., the order they are listed in) and whether or not they are ignored due to the various reasons listed.
5) As the LWin redefinition example shows, you may want to use 'Send' or 'SendInput' command for more flexibility during troubleshooting (if you don't wind up needing it of course you can go without and make the code cleaner, but it doesn't hurt anything). For example, using a Send command makes it easy to tack another character or keystroke onto a single hotkey reassignment, then look at the firing order in the key history list to see what it thinks was pressed and in what order.
If I had one of these keyboards to test with I would probably take one of the two-line examples you listed and turn it into a four-line key reassignment, in the manner of the LWin reassignment example, then look at what's happening in the key history. I might add a pause statement too, in order to catch it in the act and be able to look at the keystroke history right up to the point where the pause got executed, which would exclude the log from showing any modifier keys getting released.
I have no idea if this would work, but here's an outline of the type of thing you might start with for debugging purposes.
*LAlt::Send {LCtrl Down}
*LAlt Up::Send {LCtrl Up}
*LCtrl Up::Send {LAlt Up}
*LCtrl::
Send {LAlt Down}
Pause ; once the script is paused you can go look at Key History
Return
Best Answer
Let me throw in a totally different approach: