# Not all keys are registering?

**URL:** https://forum.kirupa.com/t/not-all-keys-are-registering/299746
**Category:** flash
**Created:** [November 10, 2009, 2:42pm UTC](https://forum.kirupa.com/t/not-all-keys-are-registering/299746 "2009-11-10T14:42:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jik\_ff](https://avatars.discourse-cdn.com/v4/letter/j/bc79bd/32.png) [@jik\_ff](https://forum.kirupa.com/u/jik_ff)
#### Post date: [November 10, 2009, 2:42pm UTC](https://forum.kirupa.com/t/not-all-keys-are-registering/299746/1 "2009-11-10T14:42:08Z")

</div>

Ok, so I am trying to get a keyboard input why my game is playing. So here is my code below. Thing is, only certain keys are coming up in the trace. So if I press the a key, nothing happens. If press the d key, I get the trace. Only a handful of the keys are registering… why?

```auto
 
   function PowerUps(e:KeyboardEvent):void{
    var holdout = getTimer();
    var theKey:String = String.fromCharCode(e.charCode); //the key code the was pressed
    
    trace("pressed "+theKey);
    if(holdout < frameTime + 300) //1 sec. delay between key presses
    {
     return
    }
    if(theKey == String("b"))
    {
     if(aDude.boosts > 0)
     {
      trace(aDude.boosts+" Boosts Left");
      //VelocityChange(50, aDude.rotation); //need to make this function
      aDude.boosts--;
     }
    }
   }

```
