I am stuck on this. I am trying to output the specific key pressed to the console, but at the moment all of the keys pressed output "2". Help would be greatly appreciated!
import pygame
pygame.init()
s = pygame.display.set_mode((640, 480))
running = True
while running:
for e in pygame.event.get():
if e.type == pygame.QUIT: #The user closed the window!
running = False #Stop running
# Logic goes here
if e.type == pygame.KEYDOWN:
print(e.type)
pygame.quit()