Im making a basic game
<http://www.jasonhuman.co.za/lazerlazer>

The idea is to learn more about javascript and the canvas

The problem im having is that i bound onkeypress on the body element
it only allows for a single keypress to be picked up at a time
and its not all that smooth - the ship lags for a second before starting its movement

how can i make it that the ship immediatly starts moving in the correct direction
as soon as the keypress happens?

here is my code that controls the keypress event:

```
  function keyPress(e){
    //w=119, s = 115, a = 97, d = 100
    if(e.charCode==119){
      player[0].ypos -=15;
      playerImg.src = 'images/playerUp.png';
      engines.play();
    }
    if(e.charCode==115){
      player[0].ypos +=15;
      playerImg.src = 'images/playerDown.png';
      engines.play();
    }
    if(e.charCode==97){
      player[0].xpos-=15;
      playerImg.src = 'images/playerFW.png';
      engines.play();
    }
    if(e.charCode==100){
      player[0].xpos+=15;
      playerImg.src = 'images/playerFW.png';
      engines.play();
    }
    //fire a bullet
    if(e.charCode==32)
    {
      //fire a bullet
      bullets.push(new init(player[0].xpos+88,player[0].ypos+25));
      //gunshots
      var gunshot = new Audio('lazer.mp3');
      gunshot.play();
    }
  }

```