I'm using Macromedia Flex 1.5 with AS 2.0, I want to keep ctrl + c keyboard event for a datagrid,
I'm trying following code, but it's not working. What am I doing wrong?
if (Key.isDown (Key.CONTROL) && Key.isDown(67))
mx.controls.Alert.show("Copied Succesfully: ");
mx.controls.Alert.show("Press control + c to copy: ");
<mx:DataGrid width="100%" height="35%" id="cur1_DataGrid" sortableColumns="false" change="level1var.checkForChanges()" keyDown="myOnKeyDown()">
Actually, if(Key.isDown(67)) is working fine and if(Key.isDown(Key.CONTROL)) also working fine when they are given individually.
but (Key.isDown(Key.CONTROL) && Key.isDown(67)) is not working.
The browser usually eats a bunch of keys. You may need some custom HTML wrapping to get those keys.
Could you please explain me more detail, with an example.
Flex uses Flash which is a browser plug-in. The browser decides which keystrokes to forward to the plugin.