I'm using `window.requestAnimationFrame` to create a game loop. 

Everything works great, but when I try to add an event listener it fires hundreds of times really fast.

I've tried using a closure, but that doesn't seem to work.

```
game.update = function(){
   //code that runs every frame
   window.addEventListener('keydown', function(){
      console.log("message");
   },false);
}

```

I want to call a function **ONCE** on the keydown event not multiple times.