You can record the keys being pressed with a KeyboardEvent.KEY_DOWN and KeyboardEvent.KEY_UP. You have to add these to the stage on application complete or they will not work.
<mx:Application applicationComplete="ApplicationComplete()" etc...
And then have a function:
public function ApplicationComplete():void {
stage.addEventListener(KeyboardEvent.KEY_DOWN, KeyDown);
stage.addEventListener(KeyboardEvent.KEY_UP, KeyUp);
}
And then the event functions:
public function KeyDown(e:KeyboardEvent):void {
if (e.keyCode = whateverTheInsertKeyCodeIs) {
isInsertPressed = true;
}
}
public function KeyUp(e:KeyboardEvent):void {
if (e.keyCode = whateverTheInsertKeyCodeIs) {
isInsertPressed = false;
}
}
Or if you're using it as a toggle:
public function KeyDown(e:KeyboardEvent):void {
if (e.keyCode = whateverTheInsertKeyCodeIs) {
insertToggle = !insertToggle;
}
}
I hope this helps!