The Flash ActiveX Player doesn’t receive ESCAPE key presses. Probably because IE doesn’t pass this along to the Player.

When you receive a keyDown event, you can find out of the ESCAPE key has been pressed. But this only works if the user presses ESC and another key at the same time.

 

There is no workaround. You’ll just have to not use the ESC key in your application.

 

Jason

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Dmitry Miller
Sent: Wednesday, June 14, 2006 5:11 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Capturing ESCAPE key in IE

 

Hello all

I am trying to capture ESCAPE key press by TextInput control in Flex 1.5.

<mx:TextInput keyDown="handleKeyDown(event)" ...

and later inside mx:Script tag I have the following implementation

private function handleKeyDown(event:Object):Void
{
if(event.code == Key.ESCAPE)
{
//do smth
}
if(event.code == Key.ENTER)
{
//do smth else
}
}

The above code works great in Firefox but doesn't work in IE. Also, to
make the matter worse, the code for capturing Key.ENTER works in both
browsers. Any suggestions?

Thanks

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to