Umm... you've got public void myKeyDown
when it should be: public function myKeyDown... and make sure you have <mx:DataGrid ... keyDown="myKeyDown(event)" Adam ----- Original Message ----- From: jmorpher03 To: flexcoders@yahoogroups.com Sent: Monday, March 05, 2007 9:11 PM Subject: [flexcoders] Re: ctrl key with a combination - doesnt seem to work Does anyone know how the the CTRL + <key combination> work ? Is this a Flex bug ? The Flex sample code in the help docs talks about this, but it doesn't seem to work. Whats wrong ??? --- In flexcoders@yahoogroups.com, "jmorpher03" <[EMAIL PROTECTED]> wrote: > > Hi, > > I am trying to trap the ctrl key along with a combination of any other > alphanumeric key by using the following code on a DataGrid control: > > public void myKeyDown(event:KeyBoardEvent):void { > if ( event.ctrlKey && event.keyCode == 67 ) // for 'C' > { > // copy selected row > } > } > > This does not seem to work. Nor is any other key combination detected > when we use the ctrl key. > > Isnt this the way to handle keyboard events ? Is there any other > explicit way to handle it ? > > Regards, > Asgar. >