How to capture Ctrl-A, Ctrl-Z

Hi I'm trying to build a flash application, and having
trouble capturing key combinations such as Ctrl+A or Ctrl+Z.
I'm doing stage.addEventListener(KeyboardEvent.KEY_DOWN,
keyDownHandler)
and keyDownHandler checks event.ctrlKey and event.keyCode.
Ctrl+Y works, but most of other Ctrl + Key combinations don't
work, I think because those key strokes are
captured in Flash Player / Browser before captured by AS3.
Does anyone know good solutions?

for what it's worth, i spent a couple of intensive weeks
developing a solution for a flash .swf embedded in a browser page
to do exactly the kinds of things you are asking about, trapping
all those "special" keys where the browser seems to intercept them
and act differently, and Flash never gets to trap or respond to
them. Things like F1, F5, F11, CTRL+N, and so on. The answer was
that there was no good flash way to do this. But what I found was
that in Javascript (at least in IE) I was able to trap all those
events through various different methods, but ONLY if the document
and NOT the flash had the window focus. So, the archaic, ugly
solution I came up with involved making sure that the flash object
actually never got the focus (with an onfocus="this.blur();"
approach) and then setting up an elaborate system where I could
trap all events in Javascript, filter them as appropriate, and then
pass into Flash only those "events" that I wanted to let it
process. Inside of Flash, using actionscript 3's new Event model, I
would then simulate those events according to the values passed in
to Flash from the javascript.
Basically, this is like tricking flash into thinking it has
focus, so that it tracks caret position in text fields,
highlighting selections, etc, but actually javascript stays in
control 99.999% of the time.
As you can imagine, there were LOTS of gotchas in all of
this, and a few places where I didn't even bother trying to figure
out how to get it to work cross-browser, though I think it's
possible with more effort/time.
One gotcha was that some events (such as Text Entry) could
not be properly simulated with an actual Flash event, so I had to
manually insert characters into text boxes at the appropriate
location based on the caret position that flash thought it had.
After all was said and done, this was so complicated and
tenuous that I basically basked in my glory of finding a solution
for only a few minutes before tearing it all apart and
re-architecting my solution from scratch. I pulled the text boxes
out of Flash and put them in HTML, and then connected the two via
events, etc. The end result looks and behaves the same, but is MUCH
less obfuscated and confusing, and probably a lot more likely to
remain functional down the line.

Similar Messages

  • Capture Ctrl-C Ctrl-V Keys

    Hello!
    Is there any way I could capture the Ctrl-C Ctrl-V key?There seems no trigger for such...Tried Key-Others but won't work (or will it)?
    Anyway, any input guys?
    Thanks!

    You would need to use a pjc such as the keypressed.jar example. I believe communication back to former is better with forms 11

  • How can I enable the standard ctrl-n/ctrl-p shortcuts to navigate dropdowns in Mac OSX?

    In OSX, ctrl-n/ctrl-p are are generally accepted as substitutes for up/down, and those keyboard shortcuts can be used to move the selection up/down in a dropdown menu. Safari and Chrome properly move the dropdown selection, but Firefox does not.
    Firefox correctly moves the textarea cursor up/down using ctrl-n/ctrl-p. It just does not work on dropdown menus.

    OK I posted a link to this thread on that forum thread but I still think this is general enough that it could be answered in this forum.

  • How to Apply Hotkey like ctrl+char on JButton

    Hi,
    I have many JButton on my screen. I want apply hot key like Ctrl+U,Ctrl+L etc. on these buttons.
    Please help me.
    Thanks
    Nitin

    Hi,
    I m using this code but it is giving NullPointer Exception.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    class hotkey extends JFrame implements ActionListener
         public hotkey()
              JPanel pan=new JPanel();
              JButton btn=new JButton("Click");
              add(pan);
              pan.add(btn);
              btn.addActionListener(this);
              btn.registerKeyboardAction(this, KeyStroke.getKeyStroke('L', KeyEvent.CTRL_MASK), JComponent.WHEN_FOCUSED);
         public static void main(String arg[])
              hotkey hk=new hotkey();
              hk.resize(100,100);
              hk.setVisible(true);
         public void actionPerformed(ActionEvent ae)
              String s=ae.getActionCommand();
              if(s.equals("Click"))
                   System.out.println("U Click Me");
    }Error :
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at hotkey.actionPerformed(hotkey.java:59)
    at javax.swing.JComponent$ActionStandin.actionPerformed(Unknown Source)
    at javax.swing.SwingUtilities.notifyAction(Unknown Source)
    at javax.swing.JComponent.processKeyBinding(Unknown Source)
    at javax.swing.JComponent.processKeyBindings(Unknown Source)
    at javax.swing.JComponent.processKeyEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    Please Solved it
    Thanks
    Nitin

  • CTRL + C, CTRL + V - copy paste

    Hi,
    I created one menu ... in that for copy & paste i given short as CTRL+V , CTRL + C. But the problem is when i do CTRL+C CTRL+V systems defaults copy paste executing how can i sove this.
    Thanks in advance
    JOe

    I had also done some program in menu.I also experienced the same problem.For some other operations like "to open a file we use to give Alt+F,as mnemonic key " we have to write the coding for that ,but for cut,copy,paste,i.e., Ctrl+C,Ctrl+V,Ctrl+X it is default.U dont want to write coding for that.

  • For Copy/Paste ctrl+c/ctrl+v is not working

    I have a text box in flex and i want to copy the text from
    that text box through ctrl+c but it is not performing..
    Plz tell me how can i copy/paste through ctrl+c/ctrl+v

    please check the link..
    http://bugs.adobe.com/jira/browse/SDK-13185?page=com.atlassian.jira.plugin.system.issuetab panels:comment-tabpanel

  • What does the Ctrl+, and Ctrl+. do?

    I have 2 sites messed up by using these keys and cannot return them to normal. Googling reveals nothing.
    It seems to be resizing pages similar to Ctrl++ or Ctrl+-, but once you press it, it changes that site and I can't figure out how to restore.

    "[https://addons.mozilla.org/en-US/firefox/addon/default-fullzoom-level/ Default FullZoom Level]" is a Extension actually as Plugin refers to browser plugins like Flash, Java and such and are also not installed in Firefox.
    By default the '''Ctrl + 0''' (zero) (without any zoom related extensions) will set the zoom back to normal.
    She has a support thread for the Default FullZoom Level extension at http://forums.mozillazine.org/viewtopic.php?f=48&t=659681 though you will need to register an account in order to post there (note that new members first post requires post approval on mZ)

  • How to capture show layer and hide layer event in photoshop through a plugin???

    How to capture show layer and hide layer event in photoshop through a plugin???for mac

    Use the Listener plug-in found in the SDK to see how you can monitor the show/hide layer event. You can also use the Getter plug-in to show what information you can find out about the current state of Photoshop.

  • How to capture the excise duty on free material purchasing?

    Scenario is like this if we purchase a lot of material then vendor gives free on some qty. then we make a purchase order for free material with tax code zero. Vendor supply that free material with excise duty. Now we do GRN & take part1 entry. How to capture part II entry. This is capital item.

    If you are following J1IEX route , then Tick MRP indicator & enter Excise duty values & take Part2.
    It is assumed that all other master data like chapter heading etc are set.
    Hope this will help.
    Regards,
    AK

  • How to capture an image from my usb camera and display on my front panel

    How to capture an image from my usb camera and display on my front panel

    Install NI Vision Acquisition Software and NI IMAQ for USB and open an example.
    Christian

  • How to capture tax

    Dear all
    While procuring material from lacal vendor( who is importing for example SEIMENS),
    How to capture all taxes BED14%,EC2%,SEC1% and ADDL DUTY 4%,
    Because, for local vendor we are using LOCAL PRICING PROCUDURE in which there is no 4% ADDL DUTY as in case of IMPORT PO PRICING PROCEDURE
    Problem is
    After procuring from above vendor, we need to sell this material to our customer through DEPO SALES( In which we are passing CENVAT benifit ). Our customer is asking that 4% addl duty also along with 1421%
    How to capture this 4% addl duty paid by us to our vendor to pass on the same benifit to our customer
    Please guide me the scenario

    Dear
    Vendor is local.We are using LOCAL PRICING PROCEDURE(IN WHICH THERE IS NO ADDL DUTY COND TYPE)
    The problem is we need to capture the 4% addl duty paid by our vendor while importing
    Purpose is passing over this benifit to our customer through DEPO SALES PROCESS
    Question is how to capture condition type ( 4% addl duty) in our LOCAL PRICING PROCEDURE. SO that we can pass on to our customer

  • How to capture graphical outputs from other programs

    Does anyone know how we capture the graphical outputs from the other programs and show them
    on the swing?
    I'd like to use a java program to run gnuplot, capture the outputs, and show them using swing.

    Depends on what you mean by "graphic outputs".
    Taking a quick glance at the gnuplot homepage, it looks as if you can output to PNG files, so just run the app, and load the png file.

  • How to capture changed data at ALV screen

    Hi ALV Experts,
    I am using Following method for ALV display :-
      CALL METHOD g_alv_grid_0200->set_table_for_first_display
        EXPORTING
          i_bypassing_buffer            = 'X'
          is_layout                          =
          it_toolbar_excluding          =
        CHANGING
          it_outtab                          =
          it_fieldcatalog                   =
      CALL METHOD g_alv_grid_0200->set_ready_for_input
        EXPORTING
          i_ready_for_input = '1'.
    Now I am changing few values in ALV screen and capturing through following Method :-
      CALL METHOD g_alv_grid_0200->check_changed_data
        IMPORTING
          e_valid = l_valid.
    THIS ABOVE METHOD STRANGELY CAPTURES CHANGES IN QUANTITY AND DATE FIELDS ONLY AND NOT IN CHARATER FIELDS.
    Can somebody suggest how to capture changes of character fields also.
    Thanks in Advance,
    Chandan

    Hi,
    Check whether the following logic helps.
    p_er_data_changed TYPE REF TO cl_alv_changed_data_protocol.
    DATA :
        lwa_mod_cell TYPE lvc_s_modi,
        lwa_mod      TYPE ty_mod.
    LOOP AT p_er_data_changed->mt_good_cells INTO lwa_mod_cell.
        lwa_mod-row  = lwa_mod_cell-row_id.
        APPEND lwa_mod TO i_mod.
    ENDLOOP.
    Regards,
    Lohitha

  • How to capture a parameter value in SQL QUERY of scale marker using GO URL

    Hi,
    Can any one please tell me how to capture the parameter value from go url inside Where clause of Scale Marker.
    I am trying to sift the position of scale marker based on SQL Query.
    Thanks-Bhaskar Gouda.
    Edited by: 961171 on Sep 25, 2012 12:33 AM

    Since this is a synchronous interface, where source is a soap(proxy) call and target is JDBC in the first mapping both of them are request scenarios.
    Source Structure:
    RootNode
        Request             1...unbounded
           No_of_Days   1.1 String
    Target Structure:
    RootNode
       Statement
         TableName
             Action mapped to SQL_QUERY
            Access -  SELECT DISTINCT AL.EC_NO,DP.DATE_TO_FORMAL FROM T_APPLICATION_LIST AL,(SELECT DE.EC_NO AS "EC_NO", DE.PACKAGE_NO AS "PACKAGE_NO",PC.DATE_TO_FORMAL AS "DATE_TO_FORMAL" FROM DAICYO_ECNO DE,PACKAGECTL PC WHERE DE.PACKAGE_NO = PC.PACKAGE_NO AND PC.DATE_TO_FORMAL > (TRUNC(SYSDATE) - to_number('$No_Of_DAYS$'))) DP WHERE AL.EC_NO IN  (SELECT EC_NO FROM DAICYO_ECNO WHERE PACKAGE_NO IN (SELECT PACKAGE_NO FROM PACKAGECTL WHERE DATE_TO_FORMAL > (TRUNC(SYSDATE) - to_number('$No_Of_DAYS$')))) AND (AL.FAMILY = ''  or  '' is null and AL.FAMILY is not null ) and DP.EC_NO = AL.EC_NO ORDER BY DATE_TO_FORMAL
         Key
          No_Of_Days   1..1 String
    In Return I am expecting a JDBC response from the Oracle Database as:
    Source Structure:
    RootNode
      STATEMENT_response   1...unbounded
         row                               0...undbounded
           EC_NO                        1..1   String
    Target Structure:
    RootNode
      RESPONSE
        row
         EC_NO                     1..1     String

  • How to capture error message in a FM call during exception

    Hi,
    The FM i'm trying to call is giving an exception and don't have the built in mechanism to pass on the error message that occured during processing.
    However, if i see the job log in SM37, I'm able to see the corresponding error message.
    Please let  me know on how to capture this error message with in my program.
    Thanks,
    Vijay.

    Hi,
    add the exceptions...ERROR_MESSAGE to capture the error message..raised in the function module.
             EXCEPTIONS
                  ERROR_MESSAGE = 1.
    Thanks
    Naren

  • How to capture selected value from drop down by index

    Dear friends,
    i want to capture the value of select value from drop down by index, for eg if  select air france, how to capture , could any one please let me know
    Thanks
    Vijaya

    Hi Vijaya,
    You can get the value of selected from drop down as below
    Check out the event handler method attached to Onselect event of the ui element drop down by index , if no event is associated, then create an event and attach to the drop down list
    Now you will be having the CONTEXT_ELEMENT in the WDEVENT parameter
                   data lo_element type ref to if_wd_context_element.
                   lo_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT').
    Now, you can get the static attribute value of selected  drop down value & let us say your drop down list values are populated from context node 'ND_DRP_DOWN'
                   data ls_data type wd_this->element_nd_drp_down.
                             lo_element->get_static_attributes(
                                       importing
                                       static_attributes = ls_data ).
    Hope this helps you.
    Regards,
    Rama

Maybe you are looking for

  • How do I break up a concatenated disk set?

    After spending the better part of a week trying to shoehorn in two 500Gb SATA drives into my G4, I coming around to the conclusion that the Sonnet Tech PCI to SATA (TSATA) controller firmware, is not up to the challenge of concatenated drives. The OS

  • How to create simlinks in Finder?

    Morning. I'ld like to create in Finder.app simlinks as well as aliasses. Is there a tool to enable the Finders context menue to let me create simlinks? TIA and kind regards, Friedrich

  • Photoshop Elements 10 installation problem

    HELP!!  What do I do now?  I just installed the Adobe Photoshop Elements 10 on my Mac.  After opening the program, a message appeared that said "A required application library failed to load and product cannot continue.  Please reinstall".    I have

  • JDeveloper as A Database Design Tool

    Would anyone recommend it? I'm looking into usage of a few tools at the moment and I'm suprisingly impressed with JDeveloper. I find it to be a hell of a lot easier to use then Oracle Designer which i Just don't like. If anyone has used it in a proje

  • Suspend / Resume works only once

    I have suspend / resume working flawlessly on a Dell Inspiron 8500, but it will only work one time. The 2nd time I try the laptop will suspend, but I am presented with a black screen on the resume. I can toggle Caps Lock, but cannot force an X restar