title: How to detect if multiple keys are pressed at once using JavaScript?
body: <p>I'm trying to develop a JavaScript game engine and I've came across this problem:</p>
  
  <ul>
  <li>When I press <kbd>SPACE</kbd> the character jumps.</li>
  <li>When I press <kbd>&rightarrow;</kbd> the character moves right.</li>
  </ul>
  
  <p>The problem is that when I'm pressing right and then press space, the character jumps and then stops moving.</p>
  
  <p>I use the <code>keydown</code> function to get the key pressed. How can I check if there are multiple keys pressed at once?</p>