pygame input event testing [SOLVED]

Started by
0 comments, last by Genjix 18 years, 10 months ago

for event in pygame.event.get():
	if event.type == pygame.KEYDOWN:
		if pygame.key.get_pressed() == K_SPACE:
			print "hello!"


whats the problem here? [Edited by - Genjix on May 28, 2005 2:39:55 PM]
Advertisement
just found out the error. the code should in fact be
	for event in pygame.event.get():		if event.type == KEYDOWN:			if event.key == K_SPACE:				print "hello!"

This topic is closed to new replies.

Advertisement