title: SDL_KEYDOWN and key recognition not working properly
body: <p>In my project I am having trouble getting a simple switch statement to work for SDL input. Here is the example:</p>
  
  <pre><code>SDL_Event event;
  
  SDL_PollEvent(&amp;event);
  
  
  if (event.type == SDL_KEYDOWN)
  {
  
      switch (event.key.keysym.sym)
      {
      case SDLK_a: m_x -= 30;
              break;
      case SDLK_d: m_x += 30;
              break;
      case SDLK_w: m_y -= 30;
              break;
      case SDLK_s: m_y += 30;
              break;
      }
  }
  </code></pre>
  
  <p>When I run this, first off it seems SDL_KEYDOWN isn't being recognized. Nor are my cases. So I switched the code to:</p>
  
  <pre><code>SDL_Event event;
  
  SDL_PollEvent(&amp;event);
  
  
  if (event.type == 771)
  {
  
      switch (event.key.keysym.sym)
      {
      case SDLK_a: m_x -= 30;
              break;
      case SDLK_d: m_x += 30;
              break;
      case SDLK_w: m_y -= 30;
              break;
      case SDLK_s: m_y += 30;
              break;
      default: m_y += 1;
      }
  }
  </code></pre>
  
  <p>This causes the default case to run when I hold or press any key, so my object moves according to m_y += 1. If I remove the default case and try pressing w,a,s, or d, nothing happens. If i keep m_y += 1, but use SDL_KEYDOWN instead of 771, nothing happens. (I got the 771 code by printing the event.type whenever a key is being pressed). </p>