Hi Carlos,

I remember there being some issues with the control key. Using the onKeyDown
listener I can get it working when they press C and then Ctrl, but not the
other (logical) way around and this is due to the control key messing up the
order in which key messages are sent to the player. 

I ran into a similar problem in a Flash 8 Zinc 2 project where I was forced
to take some emergency measures (Zinc has a problem with listening for the
Escape key onKeyUp or onKeyDown)...

onEnterFrame = function() 
{
  if(Key.isDown(67) && Key.isDown(Key.CONTROL)) trace("ctrl-c");
}

:( Not very nice, but it worked. You can also set some flags to stop it
repeatedly performing the ctrl+c until key 17 (CONTROL) is released. So
hopefully that's something to fall back on if you have no luck with this,
but hopefully someone on the list will have some code that works.

Rich 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Carlos Rovira
Sent: 09 December 2005 11:21
To: Open Source Flash Mailing List
Subject: Re: [osflash] Combo Key Strokes doesn't work in IE?

Hi Richard,

Thanks for the response.

Yes, I'm using :

fscommand("trapallkeys", "true");

>What do you get if you log out
> Key.getCode() in this function?

If I try to use a single key like Key.DELETEKEY it works correctly

----------------------------------------------

I create a test fla with the following:

var keyListener:Object = new Object();
keyListener.onKeyDown = function() {
    // --- C
        if (Key.getCode() == 67 && Key.isDown(Key.CONTROL)) {
                keys_txt.text += "COPY " + Key.getCode();
        } else
        
        // --- P
        if (Key.getCode() == 86 && Key.isDown(Key.CONTROL)) {
                keys_txt.text += "PASTE " + Key.getCode();
        } else
        
        // --- X
        if (Key.getCode() == 88 && Key.isDown(Key.CONTROL)) {
                keys_txt.text += "CUT " + Key.getCode();
        } else

        if (Key.getCode() == Key.ENTER) {
       keys_txt.text += "ENTER " + Key.getCode();
    }
    else {
        keys_txt.text += " " + Key.getCode();
    }
        
};
Key.addListener(keyListener);

-----------------------------------------------

 keys_txt is a textfield in the _root

in Fireworks all is ok but IE don't show the combinations CTRL + C, CTRL +
V, CTRL + P

I follow testing ...maybe it could be FP8 bug?....

Thanks again for the interest.

C.


_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to