# Issue with key codes

**URL:** https://forum.kirupa.com/t/issue-with-key-codes/289934
**Category:** flash
**Created:** [June 7, 2009, 3:51pm UTC](https://forum.kirupa.com/t/issue-with-key-codes/289934 "2009-06-07T15:51:56Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![DZeiba](https://avatars.discourse-cdn.com/v4/letter/d/bc79bd/32.png) [@DZeiba](https://forum.kirupa.com/u/DZeiba)
#### Post date: [June 7, 2009, 3:51pm UTC](https://forum.kirupa.com/t/issue-with-key-codes/289934/1 "2009-06-07T15:51:56Z")

</div>

I don’t get any errors from this code, however, it does nothing.  
Any help would be greatly appreciated.

```auto

protected function keyPressHandler(event:KeyboardEvent):void
		{
			switch( event.keyCode )
			{
				case (event.keyCode == 87):
					upkeydown = true;
					break;
					
				case (event.keyCode == 65):
					leftkeydown = true;
					break;
					
				case (event.keyCode == 68):
					rightkeydown = true;
					break;
				
				case (event.keyCode == 83):
					downkeydown = true;
					break;
			
			}
		}

```
