Ivo wrote:
I am almost sure the hardware button just simulates pressing Win on the keyboard. So GetKeyState may actually report that VK_LWIN is pressed.
It doesn't, Ivo. I tested it to make sure, before I posted. Wouldn't want to request something impossible

.
The low-order bit (of the GetAsyncKeyState VK_LWIN) gets set once, but the high order bit (0x8000) never gets set!
So, if you check whether that bit has been set within the last 300ms or so (which you can do with a timer), it will work.
You may still need to check VK_CTRL because if ctrl-esc is pressed to open the start menu, VK_LWIN will also not get set. That's why I suggested telling all three apart, because they kind of go together.
I'll be happy to beta test a solution for you of course

.
GauravK, I may be oldschool but I always use ctrl-esc to open the start menu when I'm at the keyboard. It's deeply ingrained in muscle memory.