how to get keyboard input in pygame code example Example: python pygame key input if event.type == pygame.KEYDOWN: