http://bugs.winehq.org/show_bug.cgi?id=30814
--- Comment #13 from bshalm@broadpark.no 2013-04-07 17:30:44 CDT --- (In reply to comment #12)
I could be wrong but I think AOE2 always did that key-sticking when you alt-tab, even on windows. The important part is to be able to recover from it when you go back to the game.
I tried a bit in VirtualBox now. I was able to get Age of Empires II: The Age of Kings (version 2.0a) to continue scrolling sometimes, but for some reason not (the expansion pack) The Conquerors (version 1.0c).
In Wine, if I first hold an arrow key, ALT-TAB out, release the arrow key, ALT-TAB back into the game, then GetKeyboardState() will still return the arrow key as pressed (0x80|0x40). This looks a bit weird to me, but perhaps WinAPI is supposed to be that way.