teclado – Por que não funcionam as teclas pressionadas utilizando pygame?

Estou aprendendo sobre programação recentemente e olhando um vídeo na internet consegui replicar este programa abaixo, que é um jogo snake padrão, para dar uma estudada. Porém mesmo replicando exatamente o que estava no vídeo, quando coloco para rodar o jogo, apenas a tecla “LEFT” e “2” são reconhecidas, as outras não funcionam!
Seria isso um erro no código ou em alguma configuração do IDE (estou usando PyCharm2020.2.5)?

import pygame
import time
import random

# Iniciar PyGame
pygame.init()

# Definir cores
white = (255, 255, 255)
black = (0, 0, 0)
red = (255, 0, 0)
orange = (255, 165, 0)

width, height = 600, 400

game_display = pygame.display.set_mode((width, height))
pygame.display.set_caption("Snake Game")

clock = pygame.time.Clock()

snk_size = 10
snk_speed = 20

message_font = pygame.font.SysFont('ubuntu', 26)
score_font = pygame.font.SysFont('ubuntu', 20)


def print_score(score):
    text = score_font.render('Score: ' + str(score), True, orange)
    game_display.blit(text, (0, 0))


def draw_snake(snk_size, snk_pixel):
    for pixel in snk_pixel:
        pygame.draw.rect(game_display, white, (pixel(0), pixel(1), snk_size, snk_size))


def run_game():

    game_over = False
    game_close = False

    x = width/2
    y = height/2

    x_speed = 0
    y_speed = 0

    snk_pixels = ()
    snk_length = 1

    food_x = round(random.randrange(0, width - snk_size) / 10.0) * 10.0
    food_y = round(random.randrange(0, height - snk_size) / 10.0) * 10.0

    while not game_over:

        while game_close:
            game_display.fill(black)
            game_over_message = message_font.render('Game Over!', True, red)
            game_display.blit(game_over_message, (width/3, height/3))
            print_score(snk_length - 1)
            pygame.display.update()

            for event in pygame.event.get():
                if event.type == pygame.KEYDOWN:
                    if event.key == pygame.K_1:
                        game_over = True
                        game_over = False
                    if event.key == pygame.K_2:
                        run_game()
                if event.type == pygame.QUIT:
                    game_over = True
                    game_over = False


        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                game_over = True
            if event.type == pygame.KEYDOWN:
                if event.key == pygame.K_LEFT:
                    x_speed = -snk_size
                    y_speed = 0
                if event.type == pygame.K_RIGHT:
                    x_speed = snk_size
                    y_speed = 0
                if event.type == pygame.K_UP:
                    x_speed = 0
                    y_speed = -snk_size
                if event.type == pygame.K_DOWN:
                    x_speed = 0
                    y_speed = snk_size

        if x >= width or x < 0 or y >= height or y < 0:
            game_close = True

        x += x_speed
        y += y_speed

        game_display.fill(black)
        pygame.draw.rect(game_display, orange, (food_x, food_y, snk_size, snk_size))

        snk_pixels.append((x, y))

        if len(snk_pixels) > snk_length:
            del snk_pixels(0)

        for pixel in snk_pixels(:-1):
            if pixel == (x, y):
                game_close = True

        draw_snake(snk_size, snk_pixels)
        print_score(snk_length - 1)

        pygame.display.update()

        if x == food_x and y == food_y:
            food_x = round(random.randrange(0, width - snk_size) / 10.0) * 10.0
            food_y = round(random.randrange(0, height - snk_size) / 10.0) * 10.0
            snk_length += 1

        clock.tick(snk_speed)

    pygame.quit()
    quit()


run_game()