# Keypress help

**URL:** <https://forum.kirupa.com/t/keypress-help/211616>\
**Category:** flash\
**Created:** [January 3, 2007, 5:22pm UTC](https://forum.kirupa.com/t/keypress-help/211616 "2007-01-03T17:22:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lfc611](https://avatars.discourse-cdn.com/v4/letter/l/8491ac/32.png) [@lfc611](https://forum.kirupa.com/u/lfc611)\
**Post date:** [January 3, 2007, 5:22pm UTC](https://forum.kirupa.com/t/keypress-help/211616/1 "2007-01-03T17:22:05Z")

</div>

Im trying to make it so that when you type in “quit” anywhere on the screen the game will play a new MC.  
right now i have it working when you type “q” or “Q”  
heres the code:

function keyTest() {  
if ((Key.getAscii() == 81) || (Key.getAscii() == 113)) {  
trace (“QUIT GAME”);  
}  
}

var eventListener:Object = new Object ();  
eventListener.onKeyDown = keyTest;  
Key.addListener (eventListener);

Any help would be appreciated.

Thank You
