Answers for "how to detect if the space button is pressed in pygame"

0

how to know if the space button has been clicked in python pygame

state = pygame.key.get_pressed()
if state[pygame.K_SPACE]:
Posted by: Guest on February-05-2021
0

how to detect if the space button is pressed in pygame

if event.key == pygame.K_SPACE: 
	#what ever you want to run
Posted by: Guest on March-13-2021

Code answers related to "how to detect if the space button is pressed in pygame"

Python Answers by Framework

Browse Popular Code Answers by Language