I was reading some adobe forums this weekend, and came across this, and it seems like something i would use in the futures…

Here is the original item

<mx:Script>
<![CDATA[

import mx.controls.Alert ;
import flash.events.* ;

public function doEnter(event:KeyboardEvent):void
{
if(event.keyCode == 13)
{
Alert.show(“You pressed Enter”);
}
else
{
Alert.show(“You pressed :”+event.charCode);
}
}
]]>
</mx:Script>
<mx:Button id=“bt” label=“press any key” click=“assign1(event);” keyDown=“doEnter(event);”/>