title: pygame KEYDOWN event and key events
body: <p>Hi there is an issue that doesn't really matter when developing a game with pygame but that kept on bothering me for a while.</p>
  
  <pre><code>    while not gameExit:
          for event in pygame.event.get():e
              if event.type == pygame.KEYDOWN:
                  if event.key == pygame.K_RIGHT:
                      pass
  </code></pre>
  
  <p>so above is a working code and I believe</p>
  
  <pre><code>    while not gameExit:
          for event in pygame.event.get():e
              if event.type == pygame.KEYDOWN and event.key == pygame.K_RIGHT:
                  pass
  </code></pre>
  
  <p>works as well.</p>
  
  <p>However, when I just try something like "event.key == pygame.K_RIGHT:", python gives me an error saying there is no attribute 'key'.
  While I know it'd be more reasonable to choose above 2 codes over just "event.key == pygame.K_RIGHT:", I don't know why pygame would say the event doesn't have the attribute 'key' while when I simply check if event.type == pygame.KEYDOWN pygame will have no problem executing "event.key == pygame.K_RIGHT". </p>
  
  <p>Could it be that checking if event.type == pygame.KEYDOWN actually generates a 'key' attribute for the event?</p>