[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Why does ALT+F4 not get recognized here?



Hello,

I am having trouble with getting Pygame to recognize ALT+F4. I'm using
this combination of keys to invoke an exit from the program.

The code I am using works as follows:

            for event in pygame.event.get():
                if event.type == QUIT or (event.type == KEYDOWN and
event.key == KMOD_ALT|K_F4):
                    exit()
                # Other event commands follow

Every other event is recognized on this computer and exiting with ALT
+F4 seems to work on several other computers but I do not know why it
does not work with this one. It neither recognizes Left Alt + F4 nor
Right Alt + F4. What would be the best way to diagnose the cause of
this problem? I would greatly appreciate any help you may be able to
give me.

I am running Windows Vista SP1 - 64 Bit.

Thank you in advance
-Fawkes