1 Reply Latest reply on Feb 6, 2008 12:03 PM by Flex harUI

    capsLock state is wrong in creationComplete

      I have a title window that is being called from my application.creationComplete event to popup a login dialog. During the creationComplete of the TitleWindow I do a test for capslock state so that I can show a message as to whether capslock is on to assist users during password entry. I use the keyUp event to handle state changes.

      If capslock is on when the creationComplete is fired Keyboard.capsLock returns false. If capslock is off during creationComplete, Keyboard.capslock returns false also (so its right half the time ;) After this, I can succesfully detect the state of capslock like in a test button for instance.

      Any clues?

      Here is the paltry code:
      private function loginWindowDone():void
      if (Keyboard.capsLock)
      capState.text = "Capslock On";
      else capState.text = "";