How to trap the alt keycode?

Hi all,
I am trying to catch the alt keycode, when I press the alt key in keyboard.I can get all key codes, but alt key is not working.I tryed like this
stage.addEventListener(KeybordEvent.KEY_DOWN, isdown)
function isdown(event){
    trace( event.keyCode( ) )
I will get all keycode values traced, but alt is not working.
Any help on this. Thanks in advance.

I don't believe there is a keycode for the ALT key, but you can apparently determine whether or not it is active (Boolean) using theKeyboardEvent.altKey property.  See the following in the help documentation.
http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/events/KeyboardEvent.h tml

Similar Messages

  • How to trap the exception in cursors

    Hi
    How to trap the exception NO DATA FOUND/other exceptions with the cursor
    DECLARE
    CURSOR c1 IS SELECT * FROM EMP WHERE empno = 1234;
    BEGIN
    FOR i IN c1 LOOP
    DBMS_OUTPUT.PUT_LINE(i.ename);
    END LOOP;
    END;so 1234 is not in my table, how to trap this.could some one help me please
    Edited by: user4587979 on Sep 27, 2010 3:46 AM

    user4587979 wrote:
    Hi
    How to trap the exception NO DATA FOUND/other exceptions with the cursor
    DECLARE
    CURSOR c1 IS SELECT * FROM EMP WHERE empno = 1234;
    BEGIN
    FOR i IN c1 LOOP
    DBMS_OUTPUT.PUT_LINE(i.ename);
    END LOOP;
    END;so 1234 is not in my table, how to trap this.could some one help me please
    Edited by: user4587979 on Sep 27, 2010 3:46 AMYou don't trap NO_DATA_FOUND in a cursor loop, as for others ... you trap and handle the ones you expect.
    NO_DATA_FOUND isn't a condition associated with the processing of a cursor loop.
    You have other options though, for example ...
    declare
       l_processed_something boolean default false;
    begin
       for x in cursor
       loop
          l_processed_something   := true;
          <more processing>
       end loop;
    end;
    /

  • How to trap the event before unlock of locked text frames

    How to trap the event before the message "You must check out the contents of this frame in order to make changes. Check out now?" for locked text frames?
    I have tried installing the service Responder kUserEditTextCmdResponder
    The responder event is fired after the unlock of text frame in this case.
    I was trying the service kEditCmdPreProcessService, but I could not find the companion interface for this service.
    How to find the companion interface?

    calle111 wrote:
    The answer to why i need the event executed if nothing has changed is that in my application the text ring will hold some predefined settings for some other controls. If the user selects one of the predefined settings from the text ring a bunch of other controls will take predefined values. These values in the other controls can now be altered by the user. If the user now wants to re-apply the same set of pre-defined settings as last time it should be as simple as selecting the pre-defined settings from the text ring. If now the same value is selected from the text ring, no event will be executed.
    What you should do instead is change the value of the ring to a "special" value (e.g. using a local variable) whenever one of the other settings change, indicating that the settings have been modified. It seems wrong to show an inconsistent value in the ring, right?
    Now, whenever you change it back to one of the default settings, is IS a value changed event and there is no problem. .
    Here's a quick draft.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    event_testerMOD.vi ‏10 KB

  • How to select the Alt BOM in the Sub-Contract PO

    Dear All,
    please tell me how to select the alternative BOM in the sub -contracting purchase order.
    for the above said requirement i have cretaed production versions and the BOMselction method also i have selcted in the material master data as "2" means BOM by produ ction version.
    so how can i select the alt BOm in theSub-contracting PO.
    Thanx in advanvce
    regards
    Srinivas

    Hi,
    SAP help says you have to write the production version in the subcontracting info record:
    http://help.sap.com/saphelp_46c/helpdata/en/b2/fa1ed4d51d11d1a69e0000e83235d4/frameset.htm
    http://help.sap.com/saphelp_46c/helpdata/en/35/b0e96787a62488e10000009b38f9b7/frameset.htm
    (I've checked a subcon-info record but sorrowfully I havent found a field for this...if you can find please let me know)
    BR
    Csaba

  • How to hide the Alt description when you hover over your links?

    I was told that you have to have a description for images, links just about everything. But when I preview my website and hover over the links, a yellow box appears with the description of the images. How do I hide this?

    You are previewing with an old (very old?) version of IE, which is the only browser on earth that does what you describe.  All other browsers play by the rules and leave the alt attribute values alone (which is what they should do). 
    You can choose to ignore this, or 'kill' it by adding a title attribute that is empty, e.g.,
    <img alt="foo" title=""...
    By the way, you add alt attributes to images for accessibility reasons.  People who browse with images turned off (and there are some) or people who use screen assistive devices (screenreaders) need some indication that there is an image at the point where they are looking/reading.  Consequently, you would only want to add content to these alt attributes where it's important to the message of the page (i.e., a cosmetic-only image would just have an empty alt attribute value). And you only need these for images, not for any other page element....

  • How to replace the "alt" key?

    I took off the "alt" key to clean it. But the plastic cap came off with it and I don't know how to put it back. Please help!!!

    Press the ALT and SHIFT key simultaneously. You should see the NUM symbol appear in the upper right corner of your screen.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • How to trap the Delete Key..

    Hi
    I have implemented key handler for a text area and I want to do something when the delete key is pressed, but somehow the delete key press event is never trapped.
    Any ideas?? Here is the code:
    text_area.addKeyListener(new KeyAdapter(){
    public void keyTyped(KeyEvent e){
    if(e.getKeyCode() == e.VK_DELETE){
    System.out.println("This was deltete");
    I checked in the debugger....this method is never invoked for the delete key.
    How do I trap the delete key event??
    Thank you for your time.

    I agree. Something like:
    String actionName = DefaultEditorKit.deletePrevCharAction;
    final Action deletePrevCharAction = textpane.getActionMap().get(actionName);
    Action myAction = new AbstractAction()
    public void actionPerformed(ActionEvent e)
    System.out.println("Pressing backspace...");
    deletePrevCharAction.actionPerformed(e);
    textpane.getActionMap().put(actionName, myAction);
    mrai3

  • How to trap the first key?

    Hello World,
    I am using JTable in that I am using custom TextField as a Editor Component. Now I want to trap the first key pressed in the textfield.
    I am using public boolean editCellAt(int row,int column,EventObject e) method. In this method I get the value of �e� as a null if I press any key. So I can not trap the event here.
    The next try is to putting KeyListener in textfield class, this is also not working because it gets called after EditCellAt method.
    I tried to override the processKeyBinding() method but this seems to trap all the key pressed and not allow me to navigate also.
    Can anybody provide me the solution how I can trap the first key only.
    Thanks in advance,
    Sachin Dare.

    Hello World,
    I am using JTable in that I am using custom TextField
    as a Editor Component. Now I want to trap the first
    key pressed in the textfield.what do you want it for?
    [.. usual l aproaches snipped ]
    The reason this is not working is that JTable uses a very uncommon way to route this first keyEvent: it comes via Jtable.processKeyBindings which first tries to start the edit with it (buggily "forgetting" to pass the keyEvent along...) and if this started the edit it will pass both keyStroke and keyEvent to the editorComponent's processKeyBindings. At his time the editorComponent is part of the container hierarchy.
    So a possible solution (did not try it, though) might be to have a ComponentListener on the editorComponent, set a flag when being added to the table and reset the flag when receiving the first KeyStroke in proocessKeyBinding after the componentEvent. Alternatively, you might try to set/reset the flag as a clientProperty in table.processKeyBindings.
    Greetings
    Jeanette

  • HOW TO  TRAP THE TELECOMMUNICATION

    HELLO,
    ACTUALLY I WANT TO TRAP THE TELECOMMUNICATION AND WANT TO SAVE THAT COMMUNICATION THROUGH FORM BUILDER IN THE DATABASE WHICH IS IN ORACLE 9I.IS THERE ANY POSSIBLE WAY TO DO THIS TASK.PLZ HELP ME ..............................

    1. You will need to get the telecommunication into a binary file on the hard drive (wav, au, mp3, etc). Forms cannot do that for you.
    2. Use webutil which comes with the latest version of forms to upload the file to a blob column in a table.

  • How to trap the Escape & Enter key ?

    I want to close the window when user presses escape key & want to trap the enter key for some action.
    Help will be higly appreciated.

    import javax.swing.*;
    public class KeyItIn extends JFrame{
       JTextArea jta[] = new JTextArea[2];
       public KeyItIn() {
          getContentPane().setLayout(new java.awt.GridLayout(2,1) );
          for(int i=0; i<2; i++){
             jta[i] = new JTextArea();
             jta.setBorder(BorderFactory.createEtchedBorder());
    jta[i].addKeyListener(new EventKeyHandler() );
              getContentPane().add(jta[i]);
    setDefaultCloseOperation( EXIT_ON_CLOSE );
    pack();
    class EventKeyHandler extends java.awt.event.KeyAdapter{
    public void keyPressed(java.awt.event.KeyEvent e){     
    jta[0].setText(" Key Typed: "+(char)e.getKeyCode());
    jta[1].setText(" Key code = "+e.getKeyCode() );
    public static void main(String[] args) {
    new KeyItIn().show();

  • How to trap the document window activate event?

    Hi All,
    I am working with a plugin development application. My requirement is, at any time I may have more than one document opened. The plugin window what I have designed gets populated with data from the xml file attached with the current document. Therefore whenever I switch between the document window, I need the plugin window to be refreshed so that it will load/display the contents from the current xml file.
    For this I need to trap the activate document window event. So whenever a window is selected from the current list of opened windows, then the plugin should get refreshed automatically.
    Actually, I tried inheriting the CWindowEH class and I used the kDocWindowBoss class for the same. But the event is not firing as expected. Help/tips from anyone could be appreciated.
    Thanks in advance.
    JR.

    Hi, <br /><br />I don't think having observers on kDocBoss and kDocumentListBoss should be a problem. We do exactly that.<br /><br />Just running with a couple of break points in your code, do you hit the DocListObserver::AutoAttach and not the Update().<br /><br />If you don't hit the AutoAttach breakpoint then it's probably the resource is not set up right. Ours is like this..<br /><br />/** Observes document list actions.<br /> */<br />AddIn<br />{<br />     kDocumentListBoss,<br />     kInvalidClass,<br />     {<br />      IID_IMYDOCLISTOBSERVER, kMyDocListObserverImpl,<br />     }<br />},<br /><br />If you're getting to the AutoAttach but not the Update then it may be that you're not specifying what notifications you wish to receive.<br /><br />Our AutoAttach is like this..<br /><br />     do<br />     {<br />          InterfacePtr<ISubject> subject( this, UseDefaultIID());<br />          if (subject != nil)<br />          {<br />               if ( subject->IsAttached(this, IID_IDOCUMENTLIST, IID_IMYDOCLISTOBSERVER) == kFalse )<br />                    subject->AttachObserver(this, IID_IDOCUMENTLIST, IID_IMYDOCLISTOBSERVER);<br />          }<br />     }<br />     while ( kFalse );<br /><br />with equivalent DetachObserver code in the AutoDetach of course.

  • How to trap the two function code in the bdc

    Dear All,
    I have a bdc program now i need to pick up function code based on some condition. means if some condition then goto one function code and else don't go. I tried it but not working. It is working in shdb but not in the program.
    eg.
        if not zcontract_no is initial.
           perform bdc_dynpro using 'SAPMZW_CREATE_SALES_ORDER_STD'
                                    '9000'.
           perform bdc_field using 'BDC_CURSOR'
                                        'P_CONTRACT'.
            perform bdc_field using 'BDC_OKCODE'
                                    <b>'=COPY'.</b>
          endif.
    perform bdc_field using 'BDC_OKCODE'
                                    <b>'=SUBMIT'</b>.
    Please suggest.
    Regds,
    Anup

    Hi ,
        In your second case u r not specifying the BDC DYNPRO screen number , your code should be
    if not zcontract_no is initial.
    perform bdc_field using 'BDC_OKCODE'
    '=COPY'.
    else..
    perform bdc_field using 'BDC_OKCODE'
    '=SUBMIT'.
    endif.
    Kunal

  • How to trap the exiting oracle errors

    hi,
    i am getting some errors/messages like
    DAC-106,DAC-603 WHILE INSERTING DATA in frames,so i want control or remove the erors of above,
    please any one may help
    jpullareddy

    Read the documentation about the DAC ErrorManager.
    You can register ErrorHandlers in the ErrorManager.
    This allows you to write your own Errorhandling routines, intercept, handle and rollback the error.

  • How to fix the Alt F10????

    Moved for better exposure.

    Hi okekeP,
    The imageCLASS MF4380dn was not released by Canon USA in the United States, but was distributed in other markets such as Canada, Europe and Australia.  I would recommend to referring to the Canon support group for your geographical area to ensure the proper support application is being used for your product. However. I will be happy to offer some assistance.
    The closest US model would be the imageCLASS MF4370dn. The recommendation when the error occurs with this model is to perform a reset the product.  If you have not done so already, please attempt to reset your laser printer as outlined below:
    1. Disconnect the power cord attached to your machine while "on" for up to 10 minutes.
    2. Reconnect the power cord for the unit and plug it into a different known working outlet direct to the wall (not a surge/power strip) to ensure it is receiving full power.
    4. Once your unit has initialized, confirm an error is not displayed in the LCD.
    If unresolved, please refer to your Canon support contacts for further assistance and whether a firmware update may be available to address the issue or if service may be required.
    In case helpful to you, here are direct links to the product page for your laser product:
    - if your product was purchased in Canada, you can visit the product page for your laser device on the Canon-Canada website, www.canon.ca.
    - if your product was purchased in Australia, you can visit the Canon-Australia website, www.canon.au.
    - if purchased in Europe, you can visit the Canon-Europa website, www.canon-europe.com
    I hope this is helpful to you.
    Did this answer your question? Please click the Accept as Solution button so that others may find the answer as well.

  • How to trap ALT key?

    Hello guys!
    After searching and investigating quite a lot, I am posting
    my problem here in hope that God bless me with success
    I am working on an eLearning course whereas client requied
    the course to be keyboard accessible. He wants all the shortcuts
    with Alt key combination.
    I can trap the Alt key with the use of enterframe but that
    makes my course processing heavy so I tried to trap Alt key with
    keylistener event but unfortunately keylistener event doesn't
    listen Alt key
    Could anyone suggest me how to trap Alt key without using
    enterframe or interval?
    Thanks a lot for sparing your precisious time.

    I believe Alt-Space is a keyboard shortcut in Windows XP to bring up the window menu for any app...so it's not just a LabVIEW thing. Further, it appears that Windows grabs that key combination before a LabVIEW event structure can get it.  I don't know any way around this behavior, since Windows appears to be taking matters into its own hands with certain key combinations.  My advice would be to use a different key combination for your app.
    -D
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

Maybe you are looking for