# 2 keys at once

**URL:** <https://forum.kirupa.com/t/2-keys-at-once/315048>\
**Category:** flash\
**Created:** [October 15, 2010, 11:08pm UTC](https://forum.kirupa.com/t/2-keys-at-once/315048 "2010-10-15T23:08:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jagguy](https://avatars.discourse-cdn.com/v4/letter/j/b487fb/32.png) [@jagguy](https://forum.kirupa.com/u/jagguy)\
**Post date:** [October 15, 2010, 11:08pm UTC](https://forum.kirupa.com/t/2-keys-at-once/315048/1 "2010-10-15T23:08:16Z")

</div>

My code doesnt detect 2 kest at once.  
I want to press an arrow key and spce bar.  
In .net the below code does do this but in flash if I hold down an arrow key and press space bar the arrow key event will stop working.

private function doSomething(e:KeyboardEvent):void {

var mybackList:Array ;  
mybackList=mybackground.getbackground ;

```
if (e.keyCode==39) { myplayer.moveright(mybackList); }// Right
     
if (e.keyCode==32 && myplayer.jumping ==false) {
myplayer.jumpStart();
}
```
