# \[AS2\] Map keys

**URL:** <https://forum.kirupa.com/t/as2-map-keys/277419>\
**Category:** Uncategorized\
**Created:** [December 11, 2008, 7:51pm UTC](https://forum.kirupa.com/t/as2-map-keys/277419 "2008-12-11T19:51:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tivaelydoc](https://avatars.discourse-cdn.com/v4/letter/t/82dd89/32.png) [@tivaelydoc](https://forum.kirupa.com/u/tivaelydoc)\
**Post date:** [December 11, 2008, 7:51pm UTC](https://forum.kirupa.com/t/as2-map-keys/277419/1 "2008-12-11T19:51:18Z")

</div>

I’ve seen several online games that allow the user to input their own keys in the option menu. I was wondering if someone could show me a step by step tutorial. I know I would have to use the var in the script, for example:

onEnterFrame = function() {  
if (Key.isDown(upkey)) {  
mcUse.\_y -= 5;  
}  
}

But what I’m stuck on is executing the Key.getCode() by clicking on the MC in the stage, such as clicking the up MC to set the new up key, also I need the MC to say via image “Click Any Key”, as well I need it to say the key you selected in a text box, and last I need to figure out how to set defaults.

What I was thinking of doing is using getASCII and somehow telling it put it in a dynamic text box on the first frame of the adjacent MC. Then when the MC is clicked on, it should go to frame two and say “Hit Any Key”.
