The main motive of doing such an exercise was to learn sending keyboard events 
programmatically
to flex through JavaScript, in case the browser would block ctrl -key events.

 In one of my earlier posts, I had mentioned about a particular limitation 
w.r.t to ctrl key events in flex application running in IE7. Although I was 
able to 
solve the issue by developing a JavaScript solution, it is not satisfactory and 
depends too much on ExternalInterface/Javascript.
An online word processor Buzzword, recently acquired by Adobe has overcome 
these shortcomings i.e it supports ctrl keyboard handling   
in most of the browsers. So I would be really grateful to Adobe if they could 
share some resources, tutorials and best practices related to this issue.

Thanks,
Peeyush Tuli
MetaDesign Solutions

  ----- Original Message ----- 
  From: Alex Harui 
  To: flexcoders@yahoogroups.com 
  Sent: Thursday, October 18, 2007 10:58 AM
  Subject: RE: [flexcoders] KeyBoard Event Simulation



  Keyboard events are notification events and not input events, which means 
that the player/textfield doesn't actually listen to and respond to these 
events, and just dispatch the events so we can know what is going on.



  You will have to write your own keyboard simulator for the TextInput that 
uses the events and alters the text and I-beam position accordingly.  Or, copy 
the text from one TextInput to the other on the "change" event.  You can even 
use binding if you want.




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

  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
Peeyush Tuli
  Sent: Wednesday, October 17, 2007 9:45 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] KeyBoard Event Simulation



  Hi,



  I am trying to pass on keyboard events recieved by a textinput to another 
textinput, so that all keyboard actions are replicated  on it. But it is not 
working. If I place a keydownhandler at the second textInput, it does receive 
the event but nothing is written into the textinput. 



      // keydownhandler for first textinput  

    public function keyDownHndlr(event:KeyboardEvent):void {
      var evt:KeyboardEvent = new KeyboardEvent(KeyboardEvent.KEY_DOWN);
       evt.ctrlKey = event.ctrlKey;
       evt.altKey = event.altKey;
       evt.shiftKey = event.shiftKey;
       evt.keyCode = event.keyCode;
       evt.charCode = event.charCode;
      

    // dispatch event to the uitextfield on the second textinput

      t1.getChildAt(1).dispatchEvent(evt);





  Am I missing something?



  Regards,
  Peeyush Tuli
  MetaDesignSolutions


   

Reply via email to