Working with Enter Key - Reply ASAP pls

Hi all,
I'm working with Actionscript 2.0. I am applying the
following code
keyListener = new Object();
keyListener.onKeyUp = function() {
var keyCode = Key.getCode();
if (keyCode == 13) {
gotoAndPlay(1318);
}else {
gotoAndStop(1314);
Key.addListener(keyListener);
Problem I'm facing is that its not working with the enter key
, however if i'm giving any other key code then its working. Infact
if i'm giving the following code
keyListener = new Object();
keyListener.onKeyUp = function() {
var keyCode = Key.getCode();
if (keyCode == 13) {
gotoAndPlay(1318);
}else if (keyCode == 32) {
gotoAndPlay(1318);
}else{
gotoAndStop(1314);
Key.addListener(keyListener);
Then its working fine but only in the case of else if part (
key Code==32, space bar ), but not with the enter key.
Please help.

disable keyboard shortcuts if you're testing in the test
environment.

Similar Messages

  • Enter key not functioning pls i need to resume backing,enter key not function another option pls.

    Enter key not functioning pls i need to resume back,enter key not function another option pls hp mini laptop.

    Hello Damyanology,
    If your enter key is not working but you have to use it, you can bring up the on screen keyboard, and that will allow you to use enter.
    Here is a link to open the on screen keyboard.
    Go into device manager and uninstall the keyboard and restart the computer. This should reinstall the driver to correct the problem.
    Here is a link to uninstall in device manager.
    Let me know if this helps.

  • How to select tree node with enter key instead of mouse click

    hia i have tree in forms 10g i can get node value when i click mouse on node but i want same with enter key which is not working any idea.
    thanx

    I'm afraid you have hit Bug 4509399
    If you have metalink access you should check Note:331369.1
    This bug has been around for the 10g R2 10.1.2.0.2 base release, which was propagated from Installing Patch 9.0.4.2 or from 10g R1 base release. You need to apply the latest patch or a one-off fix Patch 4509399
    Tony

  • Submitting form with Enter key

    Hello,
    in standard html form, when you have form with submit button, the enter key when any form element is selected submits the form.
    This is very convenient for users, so I want this with UIX forms. I know it is possible (I have one form where it is working), but I can't get it working anywhere else.
    This code works:
    <uix:form method="post" name="newRoleForm">
    <uix:inlineMessage prompt="Role name">
    <uix:textInput name="newRoleName" />
    <uix:spacer width="15" />
    <uix:submitButton text="Create" formName="newRoleForm" />
    </uix:inlineMessage>
    <uix:formValue name="jboEvent" value="newRole" />
    </uix:form>
    When I copy this code to another page, it does not work...
    Can somebody help, please?

    I've studied the HTML generated by UIX and it has following bugs and misfeatures:
    1. Misfeature: Submitting with Enter works ONLY if there is exactly one text field in the form (no submit button is actually needed), as Brian Stoler wrote. I don't understand reason for this.
    2. Bug: UIX generates javascript function "_submitOnEnter" which is called as event handler for "onKeyPress" event. But this function is erroneously generated multiple times, once for each form in the page. Browsers (Mozilla and IE) use the latest implementation. This function is different for forms with one text field and for forms with more text field, but only the first one can do the job. As a consequence of this, Enter can submit the form only if the last form on a page has single text field (which is for example not the case of search form with single field above another form...)
    Tested with UIX 2.1.7 in JDeveloper 9.0.3.3, using UIX as JSP tag library.
    Workaround:
    1. Use Opera browser: it submits form with enter key even if there is no submit button (this does not work for the first text field in the form, because it has "onkeypress" event handler).
    2. Implement this feature by hand yourself, if you really need it (see below).
    3. Use accessKey: allows to submit form with Alt+<key> combination (followed by Enter with IE).
    Implementing Enter key submits with Javascript:
    1. Put the following function to the header (or to javascript library):
    function enter(e, frm) {
    var kc;
    if(window.event) kc=window.event.keyCode;
    else if(e) kc=e.which;
    else return true;
    if(kc==13) {
    submitForm(frm,1);
    return false;
    Function copied from UIX (C).
    2. Add this event handler to each input element:
    onKeyPress="return enter(event, 'formName');"
    It is obvious that this is error prone, but it works with all browsers...
    Will this be fixed in future versions?
    Why only form with one text field can be submitted?

  • Has anyone figured out how to get speech recognition working with sticky keys enabled on mountain lion?

    I'm trying to use speech recognition to input text on my iMac running the latest mountain lion, 10.8.3.
    I have sticky keys enabled.
    When I try to start speaking by pressing the function key twice nothing happens. I can only get it to work if I disable sticky keys.
    The same problem occurs with all the other modifier keys as shortcut, they do not work with sticky keys.
    When I try to select a different shortcut, I am unable to select a two key combination, but am limited to one.
    If I select the F6 key, or any other single key, I am able to start speech recognition. However the second time that I press the key, it does not stop recognition and process my words. Instead, it restarts the recognition.
    Has anyone figured out how to get speech recognition working with sticky keys enabled?
    Or a way to get an individual key shortcut to start on the first press and process it on the second?
    Or a way to get key combinations to work, as specified by the help:
    Dictation On and Off
    To use Dictation, click On.
    When you’re ready to dictate text, place the insertion point where you want the dictated text to appear and press the Fn (function) key twice. When you see the lighted microphone icon and hear a beep, the microphone is ready for you to speak your text.
    Shortcut
    By default, you press the Fn (Function) key twice to start dictation. If you like, you can choose a different shortcut from the menu.
    To create a shortcut that’s not in the list, choose Customize, and then press the keys you want to use. You can press two or more keys to create your shortcut.

    I noticed with version 10.8.4 of OS X that I am now able to select F6 to activate, and the return key to complete the speech recognition. This is still different than the description of how these should function that's included in the help, but at least it's an improvement.

  • Shift keys on thinkpad twist not working with certain keys

    My shift keys stopped working with certain keys. asdfjkl;'zxcvm,. Those are the letters and symbols that my shift key stopped working with. Any help is greatly appreciated.

    Okay, do the following.
    1) Go into your control panel. You can get into this by either pressing Windows key + E, or search for control panel in the 'Search' box.
    2) Now select View By, and choose 'Large Icon' or 'Small Icon', which is on the top right corner of the Control Panel screen.
    3) Select 'Ease of Access Center'. Or you can skip step 1 and 2, by directly typing 'Ease of Access Center' in the search.
    4) Select 'Make the Keyboard easier to use'.
    5) Make sure you unselect 'Turn on Filter Keys' option.
    3)
    Regards,
    Jin Li
    May this year, be the year of 'DO'!
    I am a volunteer, and not a paid staff of Lenovo or Microsoft

  • Submitting a form with enter key causing strange problems

    I am having a very strange problem with a webapp I am currently developing. I am using JSF 1.2 along with Facelets and RichFaces. I have coded a workflow/wizard 4-step process, and on some pages I have 4 submit buttons that all call different actions on the page. The users thought it would be useful to have the enter key submit the form, so I followed some online resources to trap a keypress using javascript, looking for the enter keycode and calling document.getElementById("elementName").click(). This works fine most of the time. Sometimes, though, it seems as if an entire new session is being created, and odd behavior starts happening. For example, my page will only include 2 of the 4 facelets on the screen -or- I will get NullPointerExceptions for objects that I know have been created in the session bean I am currently using -or- I will get a duplicate form Id after trying to re-submit the page. Could the javascript click simulation not be submitting all of the form elements or is the enter key also acting like its default action (the form submission) in addition to the "click"? I'm really at my wit's end here (plus it's nearly 3 AM, that never helps things). All of the buttons being clicked are standard h:commandButtons. There is some setTimeout logic included to disable the buttons on the page to prevent double clicks (I cannot disable them onsubmit because disabled buttons don't pass the right values, perhaps that's causing it, but if so, clicking the buttons with the mouse would cause that issue too, right?)
    I am not posting the code (yet), but if anyone wants to take a look see and see if I am doing something really abhorrently wrong, I'm more than willing to, I'm just curious if anyone has had problems regarding javascript submission of forms via the click() method. Clicking the button does not exhibit this type of behavior. Just as a side note: I am doing different things with the enter key depending if a modal window is open (the enter key closes the modal if it's up, and if not, it submits the form via a button click).
    Any help is much appreciated, if anyone has any inkling about where I should start looking for answers it would be really helpful.
    Thank you.

    edfrost wrote:
    Could the javascript click simulation not be submitting all of the form elements or is the enter key also acting like its default action (the form submission) in addition to the "click"?My guess is the second of these. You need to suppress the event handling after programmatically clicking the button.

  • Problem with Enter key and JOptionPane in 1.4

    Hi,
    I had a problem with an application I was working on.
    In this application, pressing [Enter] anywhere within the focused window would submit the information entered into the form that was contained within the frame.
    The application would then try to validate the data. If it was found to be invalid, it would pop up a JOptionPane informing the user of that fact.
    By default, pressing [Enter] when a JOptionPane is up will activate the focused button (in most cases, the [OK] button) thus dismissing the dialog.
    In JDK 1.3 this worked fine. But in JDK 1.4, this has the result of dismissing the dialog and opping it up again. This is because the [Enter] key still works on the frame behind the JOptionPane and thus tries to validate it again, which results in another invalid dialog msg popping up.
    The only way to get out is to use the mouse or the Esc key.
    Now, in the application I put in a workaround that I was not very happy with. So, to make sure it wasn't the application itself, I created a test which demonstrates that it still misbehaves.
    Here it is.
    import java.awt.Container;
    import java.awt.FlowLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.KeyEvent;
    import javax.swing.AbstractAction;
    import javax.swing.JButton;
    import javax.swing.JComponent;
    import javax.swing.JFrame;
    import javax.swing.JOptionPane;
    import javax.swing.JTextField;
    import javax.swing.KeyStroke;
    import javax.swing.UIManager;
    import javax.swing.UnsupportedLookAndFeelException;
    import javax.swing.WindowConstants;
    * @author avromf
    public class FocusProblemTest extends AbstractAction
         private static JFrame frame;
         public FocusProblemTest()
              super();
              putValue(NAME, "Test");
         public void actionPerformed(ActionEvent e)
              JOptionPane.showMessageDialog(frame, "This is a test.");
         public static void main(String[] args)
              FocusProblemTest action= new FocusProblemTest();
              try
                   UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
              catch (Exception e)
                   e.printStackTrace();
              frame= new JFrame("Test");
              frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
              Container contents= frame.getContentPane();
              contents.setLayout(new FlowLayout());
              JTextField field= new JTextField("Test");
              field.setColumns(30);
              JButton  button= new JButton(action);
              KeyStroke enterKey = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, true);
              button.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(enterKey, "test");
              button.getActionMap().put("test", action);
              contents.add(field);
              contents.add(button);
              frame.pack();
              frame.setVisible(true);
    }Does anyone have any solution to this problem?

    I know that focus management has changed alot.
    Based on my experimentation a while back, in 1.4 it still believes that the JFrame is the window in focus, even though a JOptionPane is currently in front of it (unless I misinterpreted what was going on). Thus, the frame seems to get the keyboard event and re-invoke the action.
    A.F.

  • Submit a Form in IE with Enter key.

    Hi all,
    I have a Form with a Get attribute, a textfield and a search
    (submit) button.
    When I press the Enter key in my keyboard, the form is not
    submited in I.E. (i'm using IE 7).
    When I click the button with the mouse, it works.
    In Firefox, all (keyboard and mouse) works.
    How can we workaround this issue?
    Thanks

    oicram wrote:
    > Please, I need an answer here. I have deeply search over
    the internet and I only found something about .js or hidden fields,
    but its all vague...
    http://www.webreference.com/programming/java_dhtml/chap8/2/2.html
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Multi line field Navigation problem with ENTER key

    No trigger on the field. Multi line Property is set to true.
    The probleb is, when the cursor reaches in the multi line field. the contents of the field are hilighted/selected. So as it happens in Notepad or Word, if you select some already written text and press ENTER key the selected text will be replaced by carriage return so the selected data will be lost. Same is the case with multi line field. When field gets focus it selects the contents of field and when ENTER is pressed all the contents are deleted and a carriage return is placed.
    any solution?
    null

    Hi Nadeem,
    One work around is that you have store content of that multi-line field in to some other variable thru PRE-TEXT-ITEM and once again assign (based on some conditon) in POST-TEXT-ITEM.
    null

  • Repeat last command with enter key in dbx

    I am using dbx 7.7 on Solaris 10 (Sun Studio 12.1). Is it possible to configure dbx so that pressing the <enter> key will always repeat the previos command? for instance, if i do one "next" command, i want consequent <enter> key-presses to do "next", until i explicitly execute a different command.
    Thanks,
    Yael

    yaelfrommer wrote:
    Hello Jean,
    Thanks for this advice, i started working with dbxtool and it's very nice.
    2 questions:
    1. The Function keys (F7, F8, etc.) don't work, any idea what could be the problem?There is a bug in the dbx cmdio window where it ignores F-key. It doesn't even have
    a decent context menu. You should be able to get F7 etc working by moving the
    focus elsewhere, like the editor window.
    2. In the default .dbxrc file there's a line "button ignore step up" to "add `step up' button to GUI", but no button was added. Is there anything else i should do to make this work?
    These are really old. (we should remove them from the default .dbxrc!)
    The current way to add a button is via Debug->NewDbxButton
    Thanks,
    Yael

  • Submit OA page with Enter key in custom page

    Hello All,
    I have one custom page with 20+ fields and two submit buttons to do different processing.
    On this page, if enter key is pressed then I need to submit the form i.e. invoke processing corresponding to one of the submit button.
    I know that at field level I can bind enter key event. But for that I need to write same code 20 times for all 20 fields.
    Do we have any simple way to implement submit if enter key is pressed in any of the fields?
    Any help will be highly appreciated.
    Thanks,
    Ritesh

    Hi Ritesh,
    Not sure but you will want to try implementing the method mentioned by Anil using "OAPageLayoutBean" to get the enter key handle for all the fields in a page.
    i.e. try with
    OAPageLayoutBean page = pageContext.getPageLayoutBean();
    Hashtable params = new Hashtable(); 
        params.put ("Go", "value1");
        page.setAttributeValue(OAWebBeanConstants.ON_KEY_PRESS_ATTR, new OABoundValueEnterOnKeyPress(pageContext,
                                          "DefaultFormName", // enclosing form name
                                          params, // request parameters
                                          false, // client unvalidated
                                          false)); // server unvalidatedinstead of
    OAMessageTextInputBean HelloName = (OAMessageTextInputBean)webBean.findChildRecursive("HelloName");
             Hashtable params = new Hashtable(); 
             params.put ("Go", "value1");
             HelloName.setAttributeValue(OAWebBeanConstants.ON_KEY_PRESS_ATTR,
             new OABoundValueEnterOnKeyPress(pageContext,
                                          "DefaultFormName", // enclosing form name
                                          params, // request parameters
                                          false, // client unvalidated
                                          false)); // server unvalidatedand pls update the result.
    regards,
    Anand

  • Problem with Enter key on Aluminum Keyboard

    Just upgraded to an Aluminum iMac with the thin keyboard. We have a terminal application that communicates with our mainframe. The application looks for the 0x03 character, along with the NSNumericPadKeyMask flag, to determine that the Enter key was pressed, and then changes the character to a 0x0d (Return). This is because the 0x03 character is recognized as a Break key on the mainframe. However, when using the Aluminum Keyboard, the Enter key goes straight through as a 0x03, meaning the flag is not being set. To make things more interesting, if I use the Keyboard Viewer and click on the Enter key, the flag is set and the 0x0d is sent.
    Is there something else I should be looking for to recognize the Enter key? Perhaps something with the KeyCode? Is there some way to remap the Enter key to emulate the Return?

    I don't think you'll be able to control a Button symbol in the way you desire.  You probably need to create it as a MovieClip so that you can control what frame it is in.
    To utilize the ENTER key to take action, the following should work...
    var keyListener:Object = new Object();
    keyListener.onKeyDown = function() {
        if (Key.isDown(Key.ENTER)) {
             // do your button_mc control here
    Key.addListener(keyListener);

  • Focus navigation with enter key between controls

    hi,
    i've an app and i wanna change control focuses one to other one with pressing enter key..i think keyFocusChange property solve my prob but i couldnt fix it..
    text input
    button
    helppp pls.
    thnx

    thnx krafttimd for help..
    i solved it with an easily way..i used textInput s enter event and generate a handler.
    <s:TextInput id="kod" enter="kod_enterHandler(event)" />
    <s:TextInput id="sifre" enter="sifre_enterHandler(event)" /> 
    <mx:Button id="giris"  keyDown="giris_keyDownHandler(event)" click="checkLogin()"/>
     protected function kod_enterHandler(event:FlexEvent):void{
    sifre.setFocus();
     protected function sifre_enterHandler(event:FlexEvent):void{
    giris.setFocus();
    protected function giris_keyDownHandler(event:KeyboardEvent):void{
    if(event.keyCode == Keyboard.ENTER) checkLogin();}

  • How to activate a button with Enter key?

    Hi
    I was certain that in AC3 this is done by default, when the button is in focus and the ENTER key is press, it dispatches a Click event.. but it doesn´t work, am I missing something?? Thanks for your help.
    myButon.addEventListener("click", funClick);
    function funClick(evtObj:Event):void {
    trace("yes");

    if you have btnNum buttons with names btn1, btn2,... and they each have a listener function f1(), f2(), ...  you can use the following to code for them all and the enter key:
    var btnNum:uint=2;
    for(var i:uint=1;i<=btnNum;i++){
        this["btn"+i].addEventListener("click", this["f"+i]);
        this["btn"+i].addEventListener(MouseEvent.MOUSE_OVER,overF);
        this["btn"+i].addEventListener(MouseEvent.MOUSE_OUT,outF);
    stage.addEventListener(KeyboardEvent.KEY_DOWN,f);
    function overF(e:MouseEvent){
        stage.focus = InteractiveObject(e.currentTarget);
    function outF(e:MouseEvent){
        stage.focus = null;
    function f(evtObj:KeyboardEvent):void {
        if(KeyboardEvent(evtObj).keyCode==13 && stage.focus != null){
            stage.focus.dispatchEvent(new Event("click"));
    // define your f1(), f2() etc functions

Maybe you are looking for

  • User Account List

    User Account List Is there a way to extract all user accounts from Request Center? Ideally into a spreadsheet that includes their names and user id's as well as whether they are active or inactive. We have a "no longer with the company process" and w

  • HP printers won't work with windows 7

    I have two HP printers a laserjet 1200 series and Photosmart C5540 all in one. I can print single pages ONLY on the 1200.  If i try to print multiple pages all I get page after page with a single line of hyrogliphics.  I don't know if I spelled that

  • Collating PDFs with similar table structure into one excel / text file

    Hi, I'm using Adobe Acrobat X v10.1.1.  I have multiple PDFs which aswell as containing pictures, contain the same table of data in each one.  This is in the same format in each one and I want to extract each table's data and collate into one text fi

  • Cfapplication troubleshooting help

    A little help for a rusty CF programmer. It's been a while since I created a site using CF (2 yrs.) and am currently working on a new project, where I thought I could just snag a bunch of code from an old site I did that was very similar. I'm on a re

  • Vendor: different Recon accounts

    Is it possible to have different Reconcillatuon accounts for same vendor? Regards,