[python-win32] Capture "Windows Key" keypress

Tim Golden tim.golden at viacom-outdoor.co.uk
Thu Jul 29 16:01:03 CEST 2004


[Nate Drake]

| Is there a way to have my python program catch when the user has
| pressed the windows key, and to prevent the OS from seeing that the
| user has pressed it?
| 
| I'm writing a small "game" with pygame, and he sometimes bangs the
| windows key and the game is minimized and I go back to the desktop.

I don't know of any way to do exactly this, but even assuming someone
can come up with some system-hook derived mechanism, I would *strongly*
advise against doing it unless you have some mission-critical reason
for it... and possibly not then. I say this simply because I believe
it would take quite a low-level hack to override the Win key and such
hacks have a nasty effect of destabilising other things.

My twopence-ha'penny worth.

TJG


________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________


More information about the Python-win32 mailing list