import pygame from pygame.locals import * import sys pygame.init() display = pygame.display.set_mode((100,100)) while 1: for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() pressed_keys = pygame.key.get_pressed() #The new code from the previous folder if pressed_keys[K_a] and pressed_keys[K_SPACE]: print("Both the space bar and A have been pressed :3") else : if pressed_keys[K_a]: print("Key A has been pressed :D") if event.type == pygame.KEYUP: if event.key == pygame.K_a: print("Key A has been released :d") if pressed_keys[K_SPACE]: print("The spacebar has been pressed :D") if event.type == pygame.KEYUP: if event.key == pygame.K_SPACE: print("The spacebar has been released :d")