View Full Version : Delete key not triggering KeyUp or KeyDown
springframework
03-17-2007, 04:00 AM
I want to use the Delete key but it doesnt trigger for keyup or keydown.
this sucks.
dr_zeus
03-19-2007, 06:21 PM
Are you certain? I'm pretty sure I've captured the Delete key before.
This code correctly captures the Delete key. I tested it myself.
package
{
import flash.display.Sprite;
import flash.ui.Keyboard;
import flash.events.KeyboardEvent;
public class KeyboardProject extends Sprite
{
public function KeyboardProject()
{
this.stage.addEventListener(KeyboardEvent.KEY_DOWN , keyDownHandler);
}
private function keyDownHandler(event:KeyboardEvent):void
{
if(event.keyCode == Keyboard.DELETE)
trace("delete");
}
}
}
springframework
03-20-2007, 03:33 AM
doesn't work for me.
maybe it has something to do with my keyboard.
also i am using flash 9 alpha.
dr_zeus
03-20-2007, 06:07 PM
I compiled with mxmlc. It may be a bug in the Flash 9 alpha.
nitinmukesh123
03-30-2007, 01:14 PM
Works fine for me using Flash9 Public Alpha..
Try Control > Disable Keyboard shortcuts
select the item Disable Keyboard shortcuts.
Unselecting it does not let trap delete and some other keys.
Post here if still it does not works.
you will probably find that its only not firing when its running in debug mode from the flash 9 ide. Load the swf in IE and then press delete.
The above post will allow you to pless delete in the ide too.
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.