Get key code and char code from KeyboardEvent : Key Event « Event « Flex
- Flex
- Event
- Key Event
Get key code and char code from KeyboardEvent

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
private function keyHandler(event:KeyboardEvent):void {
trace(event.keyCode + "/" + event.charCode);
}
</mx:Script>
<mx:TextInput id="my_input" keyUp="keyHandler(event)" />
</mx:Application>
Related examples in the same category