# What is the code for using letter as keys?

**URL:** https://forum.kirupa.com/t/what-is-the-code-for-using-letter-as-keys/49737
**Category:** programming
**Created:** [April 26, 2004, 12:34pm UTC](https://forum.kirupa.com/t/what-is-the-code-for-using-letter-as-keys/49737 "2004-04-26T12:34:35Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![z\_nicz](https://avatars.discourse-cdn.com/v4/letter/z/71e660/32.png) [@z\_nicz](https://forum.kirupa.com/u/z_nicz)
#### Post date: [April 26, 2004, 12:34pm UTC](https://forum.kirupa.com/t/what-is-the-code-for-using-letter-as-keys/49737/1 "2004-04-26T12:34:35Z")

</div>

Hello everyone!

## I’m making a car game and it’s going to be for two players, now I wonder what the code is for using keyboard keys? For example I want to use the buttons “E”, “D”, "A, “F” for controlling the second car. The code that I’m using is similar to this;

[COLOR=Blue]onClipEvent (enterFrame) {  
if (Key.isDown(Key.HOME)) {  
speed += .3;  
}  
if (Key.isDown(Key.END)) {  
speed -= .25;  
}  
0.6xspeed  
if (Math.abs(speed)\>10) {  
speed \*= .9;  
}  
if (Key.isDown(Key.DELETEKEY)) {  
\_rotation -= 4.5;  
}  
if (Key.isDown(Key.PGDN)) {  
\_rotation += 4.5;  
}[/COLOR]---------------------------------  
Here I have used the “home”, “end”, “delete” and"pgdn" keys to controll the second car, and that is because it doesn’t work just changing “home” to “E”, flash won’t accept it. What’s the code for using letter as key? :-/
