title: Handling input with GLFW
body: <p>Here is the definition of my keyboard callback method I'm using to check for user input for a 2D basic game. However I'm having a problem handling certain simultaneous key presses.</p>
  
  <p>For example, If I hold the Right and Up arrows keys, the player moves 45 degrees toward the top right of the screen as it should. Then, while still holding the up and right keys, if I press Space (which fires a projectile), that works as well.</p>
  
  <p>However, if I hold the Left and Down arrow keys, the player moves as it should, but when I press Space, I get no input response, so I can't fire a projectile when moving down and left. All other movement + fire projectile combinations work, just the down and left doesn't... I can't figure out why. Any ideas?</p>
  
  <pre><code>if (key == GLFW_KEY_LEFT)
  {
      GameController::getInstance()-&gt;getPlayer()-&gt;changeKeyPress(GLFW_KEY_LEFT, action);
  }
  else if (key == GLFW_KEY_RIGHT)
  {
      GameController::getInstance()-&gt;getPlayer()-&gt;changeKeyPress(GLFW_KEY_RIGHT, action);
  }
  else if (key == GLFW_KEY_UP)
  {
      GameController::getInstance()-&gt;getPlayer()-&gt;changeKeyPress(GLFW_KEY_UP, action);
  }
  else if (key == GLFW_KEY_DOWN)
  {
      GameController::getInstance()-&gt;getPlayer()-&gt;changeKeyPress(GLFW_KEY_DOWN, action);
  }
  else if (key == GLFW_KEY_SPACE)
  {
      GameController::getInstance()-&gt;getPlayer()-&gt;changeKeyPress(GLFW_KEY_SPACE, action);
  }
  else { }
  </code></pre>