1 Reply Latest reply on Oct 16, 2012 4:09 AM by Vikrant Rai

    How to dispatch an event to the host application?

    Vikrant Rai Adobe Employee

      Can I create a keyboardEvent and dispatch it to the host application?

      I'm trying to create an onscreen keyboard, so on every mouseUp event, a corresponding keyboardEvent is created and dispatched to the host application.

       

      Is it even possible to dispatch a keyboard event programatically?

        • 1. Re: How to dispatch an event to the host application?
          Vikrant Rai Adobe Employee

          I can dispatch Keyboard Events programatically, and event listener inside my extension works just fine.

              

               var evnt:KeyboardEvent = new KeyboardEvent(KeyboardEvent.KEY_DOWN, true, false, Keyboard.M);

               this.dispatchEvent(evnt);

          However, the KeyBoardEvent is not propogating up to the host application (Illustrator).

          What do I need to do to send it on to the host application?