# Multiple keys problem

**URL:** <https://forum.kirupa.com/t/multiple-keys-problem/163948>\
**Category:** programming\
**Created:** [September 27, 2005, 3:12pm UTC](https://forum.kirupa.com/t/multiple-keys-problem/163948 "2005-09-27T15:12:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ferdi](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ferdi/32/689_2.png) [@Ferdi](https://forum.kirupa.com/u/Ferdi)\
**Post date:** [September 27, 2005, 3:12pm UTC](https://forum.kirupa.com/t/multiple-keys-problem/163948/1 "2005-09-27T15:12:01Z")

</div>

Hey all! I’m busy making a GTA1-like flash game, to test some of the new Flash8 effects. I’m having a little problem with checking multiple keys though.  
I know what is going wrong, but I’d rather use as little lines of programming as possible. Does anybody have a tip for me, what would be the best way?

Here’s an example of what I mean. I want to send multiple keys to the Walk functions:

```php
// Keys
 Key.addListener(this);
 onKeyDown = function() {
 	switch (transport) {
 		case (&quot;foot&quot;):
 			Walk(Key.getCode());
 			break;
 	}
 }

```
