« What's not to love about this sweet profile | Main | Flex BreadCrumb Navigator with Degrafa »

June 04, 2008

Displaying Character Codes in Flex

If you are capturing keyboard events and want to display the Character Code as Text all you need to do is use String.fromCharCode( …charCodes ) as in the following:

private function  keyDownHandler(event:KeyboardEvent):void

{

textInput.text = String.fromCharCode( event.keyCode );

}

 

Don’t you just love searching and searching for something that should be real simple and then feel like this:

 

Punch

 

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/t/trackback/2357234/29782650

Listed below are links to weblogs that reference Displaying Character Codes in Flex:

Comments

Hi,

Thanks for the hint, although I used charCode instead of keyCode since it seems to fit the syntax.

Post a comment

If you have a TypeKey or TypePad account, please Sign In