# Key.ESCAPE not working?

**URL:** https://forum.kirupa.com/t/key-escape-not-working/175791
**Category:** flash
**Created:** [January 17, 2006, 8:55pm UTC](https://forum.kirupa.com/t/key-escape-not-working/175791 "2006-01-17T20:55:35Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![voxecho](https://avatars.discourse-cdn.com/v4/letter/v/278dde/32.png) [@voxecho](https://forum.kirupa.com/u/voxecho)
#### Post date: [January 17, 2006, 8:55pm UTC](https://forum.kirupa.com/t/key-escape-not-working/175791/1 "2006-01-17T20:55:35Z")

</div>

Ok, more things happening that i don’t expect…

perhaps someone can tell me why in the following code up and down trace out, but escape does not?

```auto
$objKey.[COLOR=blue]onKeyDown[/COLOR] = [COLOR=blue]function[/COLOR](){
 **if** ([COLOR=red]Key[/COLOR].[COLOR=blue]isDown[/COLOR]([COLOR=red]Key[/COLOR].[COLOR=red]ESCAPE[/COLOR])){
  [COLOR=blue]trace[/COLOR]("_Escape");
 } **else if** ([COLOR=red]Key[/COLOR].[COLOR=blue]isDown[/COLOR]([COLOR=red]Key[/COLOR].[COLOR=red]UP[/COLOR])){
  [COLOR=blue]trace[/COLOR]("_Up");
 } **else if** ([COLOR=#ff0000]Key[/COLOR].[COLOR=blue]isDown[/COLOR]([COLOR=red]Key[/COLOR].[COLOR=red]DOWN[/COLOR])){
  [COLOR=blue]trace[/COLOR]("_Down");
 }
}

```
