title: making image move while key pressed down
body: <p>I am trying to make an image move while a key is pressed down. It moves but not fluidly, it wont keep moving as the button is pressed down.</p>
  
  <pre><code>import pygame, sys
  from pygame.locals import *
  
  white=(255,255,255)
  black=(0,0,0)
  
  pygame.init()
  window=pygame.display.set_mode((640, 360),0,32)
  image=pygame.image.load("white.png")
  image.set_colorkey(white)
  
  x,y=0,0
  movex,movey=0,0
  
  while True:
      window.fill(black)
      for event in pygame.event.get():
          if event.type==QUIT:
              pygame.quit()
              sys.exit()
          if event.type==KEYDOWN:
              if event.key==K_LEFT:
                  movex+=-1
              elif event.key==K_RIGHT:
                  movex+=1
              elif event.key==K_UP:
                  movey+=-1
              elif event.key==K_DOWN:
                  movey+=1
      x=movex
      y=movey
  
      window.blit(image,(x,y))
      pygame.display.update()
  </code></pre>