[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Not getting mouse up event
I am having an issue where I'm occasionally not receiving the MOUSEBUTTONUP
event from the event queue, until I execute another mouse event.
I am checking the event queue every frame like this:
key_ups= [event.key for event in pygame.event.get(KEYUP)]
mouse_ups = [event.button for event in pygame.event.get(MOUSEBUTTONUP)]
key_downs = [event.key for event in pygame.event.get(KEYDOWN)]
mouse_downs = [event.button for event in pygame.event.get(MOUSEBUTTONDOWN)]
if K_ESCAPE in key_downs or pygame.event.peek(QUIT):
sys.exit()
myPlayer.GetInput( key_ups + mouse_ups, key_downs + mouse_downs )
The keyboard events will come through fine, but the MOUSEBUTTONUP will not be
picked up until I move the mouse, or press another button. The instant I move
the mouse, it fires, even if I had released it moments ago. It only seems to
lock up if I hold the button down for ~8+ seconds.
Anyone know what's going on?
(Also, the cursor page in the online documentation is NOT FOUND.)
-austin