Pressing Enter or Return Key script

I'm using a text input component that accepts text. I have a
movie clip button that can be clicked and the results of my
function appear in another text field. All works great. How can I
make the button work and run its function if the user just hits the
enter/return button on the keyboard instead of mouse clicking on
the button?
Thanks,

Sorry, I forgot to post that I'm using AS3. I'm still having
trouble with this one, though. Do I need to addEventListener
(KeyboardEvent) before this? Here's what I currently have that
works great. id is a string var and reply is an array var. id_text
is my input text field component and answer_txt is my text field
component.

Similar Messages

  • InDesign CS5 - Enter and Return keys give unexpected results

    I've been using CS5 for just a few days (Mac Pro, Mac OS X 10.6.3). I've noticed that the Enter and Return keys aren't always behaving as expected. Enter doesn't give me a column break, shift-Return doesn't give me a line break but a new paragraph, and more often than not I can't select the default option in a dialog with either Return or Enter. I've just read cpsid_84345, which says this is an issue in German and Swedish language versions, but I'm using English. The 7.01 update doesn't seem to be available. Any advice?

    That the KBSC files are XML doesn't guarantee faultless migration from one version to the next, probably because Adobe just forgot to cope with importing KBSCs from previous versions. It's great that InDesign offers you such flexibility with the KBSCs, but it's terrible that the implementation has been so sloppy in at least the three last versions (maybe earlier versions, too, but I try to repress the memories).
    Some people have been asking Adobe to make KBSCs scriptable. This would enably you to maintain a small database with KBSCs which a script could read and feed into a new version of InDesign, or redo a KBSC file after it has become corrupt, or whatever minor or major mishap.
    The more people ask for this the better: go to http://www.adobe.com/support/feature.html and request script access to the KBSCs.
    Peter

  • Enter vs Return key?

    Sorry if this has already been asked, but I was wondering - what is the difference between the return key and the enter key on my keyboard? For me - I hardly ever use the real "enter" key near the command key. I always use the regular enter key above the shift, but yet it is actually a "return"? I also noticed that holding the FN key while pushing return makes it the "enter" key because it is in the gray font on the key. Any info on the differences of these keys? Thanks!

    Not that I can tell (usually). It may make a difference in some applications, but I always use the Return key, too.

  • Pressing enter query function key more than once displays past search key

    At present, in Oracle Forms this is what's happening:
    1. User presses entery-query (F7)
    2. User searches for employee name smith. Plases %Smith% in the employee name field.
    3. User presses execute-query (F8)
    4. All employee names with "Smith" is displayed.
    5. User presses enter-query again (F7). Screen is cleared.
    6. User presses enter-query for the 2nd time (F7). %Smith% appears on the employee name field.
    The problem is the user do not want %Smith% to appear the second time they press enter-query. If you guys have any idea or have experienced this, please let me know.
    Thanks.

    You are experiencing the default query last criteria functionality. When you execute the ENTER_QUERY built-in while in enter query mode, it will show the last query criteria. To override this, you could create a KEY-ENTQRY trigger on your block and give it code similar to:
    IF :SYSTEM.MODE != 'ENTER-QUERY' THEN
      ENTER_QUERY;
    END IF;

  • How can labview update the string control (text-edit box) after we have pressed the carriage return key on the keyboard during text-editing within that box?

    Dear readers,
    I have been trying to work out how to get labview to detect the event when a 'string' control has been modified, where the user has finished editing the string either by 1) pressing the enter key on the keyboard, or by 2) taking the focus away from the string control again. For example.. if I use the mouse to click on the string control and then I type 1234 into the box, I would like to have a routine that does something once the user hits the Enter key of the keyboard, or when the user takes the focus away from the string control again by clicking on something else. I would like the routine to respond even when the user didn't change anything in the text box (such as when we mouse-click on the edit box to go into edit mode, and then mouse-click on something else to remove the focus with no changes to the contents in edit-box).
    The purpose of my routine is to have a edit-box for a user to change for example the centre-frequency of a vector network analyser, so that the centre-frequency of the network analyser can change once the user finishes entering a new value in the text-edit box by hitting Enter key after the number is keyed in. Even if the user has clicked on the edit box, but changes their mind by mouse-clicking on something else to remove focus from the edit box, I would still like labview to detect the event when the control loses focus, so that the centre frequency can be updated anyway (to the same value that was already in the edit box).
    So far, I've tried set the string control option to 'limit to single line', so that I can try to scan for a carriage return .. '\n' ... pattern in the string. Unfortunately this doesn't work because labview doesn't seem to attach the '\n' to the end of that single line.
    Could someone please suggest ways to set a flag when a user hits Enter during text-edit mode of a string control, or when focus has been removed from the string control?
    While I've only described my problem for controlling a single control parameter on the gpib device, I'd like to make this feature work so that I can do the same kind of thing with other control parameters as well.
    Thanks so much in advance.
    Kenny

    Hi Kenny,
    instead of using the event structure, you can directly achieve to what you want by the KeyFocus property of the string control.
    - Enable Limit to single line option
    - Create the property KeyFocus in read mode and connect an indicator
    Each time you click on the string to modify it KeyFocus is True; when you click away or hit Enter KeyFocus is False.
    You can toggle your settings when KeyFocus changes from True to False.
    Alberto

  • Is there a way to change the defaulted (press 'Enter or Return on keyboard) button in a dialog box? Specifically,

    When the cookie preference is set to "ask every time" the default button (highlighted & selected when I hit return or enter) is "allow." Can I change the default button to "allow for session" so I don't have to use the mouse to select it?

    Your question/suggestion got me thinking about making a programmable function key (PFK), but I couldn't think how to make a PFK represent a mouse click. Then I tried the option [ ⌥ ] key (I don't have Alt [⎇ ] ) and the s, with or without the shift. I tried the command [⌘] key, and finally the control [⌃] key with the s — that's the one that worked. 8¬D
    I remembered scripting radio buttons, which might apply here, but it's been too long ago.
    Thank you for pointing me in a new direction, that will do well enough 'till I find out if the default button(s) can be changed in dialog boxes in general.

  • Pressing enter (hard return) moves next line to next pg/frame/col

    Hi,
    I read this was a glitch in German and Swedish CS5 Mac version.
    Options seem to be set correctly.
    Thanks

    Do you have the German or Swedish version? Have you updated to 7.0.3?
    This is actually also a fairly common problem on some Windows laptops where the BIOS maps the two enter keys together. Toggling NumLock switches the behavior between a column break and a paragraph break. I'm not sure if affects Macs without numberpads, but I think not.

  • Pressing ENTER key in clickToEdit af:table

    Hi,
    In our application, we have a click-to-edit table. We are experiencing the following problem.
    - Suppose one of the rows are selected, and focus is in an editable field.
    - Press the ENTER (or RETURN) key
    - The previously selected row is still selected (colored dark blue), but the fields of the row below are editable.
    This did not happen in 11.1.1.6 (after pressing enter, the same field of the second row was editable and focussed), but it does in 11.1.1.7
    Is this a known problem? Workaround??
    Screenshots:
    - before pressing enter: http://awesomescreenshot.com/0c416xvp94
    - after pressing enter :http://awesomescreenshot.com/0fa16xw841
    Table:
    <af:table value="#{bindings.DepartmentsView1.collectionModel}"
                            var="row"
                            rows="#{bindings.DepartmentsView1.rangeSize}"
                            emptyText="#{bindings.DepartmentsView1.viewable ? 'No data to display.' : 'Access Denied.'}"
                            fetchSize="#{bindings.DepartmentsView1.rangeSize}"
                            rowBandingInterval="0"
                            selectionListener="#{bindings.DepartmentsView1.collectionModel.makeCurrent}"
                            editingMode="clickToEdit"
                            id="tDep"
                            summary="Departments table"
                            rowSelection="single">Edited by: Fortega on 22-apr-2013 8:51

    Hi,
    I don't think this is intentional and thus should be filed as a bug. If you have a customer support contract or if you are from Oracle, please file a service request with support or file a bug directly. If none of the too applies, please send me a test case based on the HR schema in a ZIP file you rename to "unzip". My mail contact is in my OTN profile you find by clicking on my name next to this reply.
    Frank

  • Erroneous behavior of return keys in Indesign CS5

    Strange and reproducable serious error of Indesign CS5: Pressing the main return key within a text paragraph doesn't enter a line break but a "new column" break making all text below disappear (and being pushed to the next column or linked text frame), pressing the enter key of the numeric pad strangely enters the "end nested paragraph here" symbol. Trashing preferences (via holding Shift-ctrl-alt-cmd on startup) doesn't help. I managed to get the main return key to work through a custom keybord definition, but it doesn't work with the enter key of the numeric pad (the last key on the bottom right).
    I'm using the trial version of Indesign CS5 on Mac OS X 10.6.3 in German and expect the master collection package I ordered in the mail every day - would be great if Adobe provided a fix to this problem soon.
    Am I the only one experiencing this problem and is it somehow connected to my particular installation or is this a common error?

    Currently, we believe this issue only to affect only the Macintosh OS, German and Swedish versions of InDesign and InCopy CS5. We have published the following KB docs:
    English - http://go.adobe.com/kb/ts_cpsid_84345_en-us
    German - http://go.adobe.com/kb/ts_cpsid_84345_de-de
    Swedish - http://go.adobe.com/kb/ts_cpsid_84345_sv-se

  • Capture keyboard characters without hitting return key

    Is it possible to get a keyboard key typed character without requiring the user to enter the RETURN key?
    For example, the user press a key and the screen will echo the key pressed in console mode, not in GUI mode.

    Is it possible to get a keyboard key typed character
    without requiring the user to enter the RETURN key?The shell that's running in your console window will not give the kay strokes to the rpogram until the human hits enter/return. This is so the shell can do all the editing (EG backspace, etc).
    In unix you can put the console in 'raw' mode which lets every key stroke through. See the 'stty' command

  • OneNote 2013: Font changes when pressing Enter / Return key

    I have the same problem as this guy (who didn't get a relevant answer): http://social.technet.microsoft.com/Forums/office/en-US/233833f7-dde8-414d-bdca-604ed8d57667/onenote-2013-font-changes-when-pressing-enter-return-key?forum=officeitpro
    I set my default to Calibri 14, but every time I press enter (I make a lot of bullet lists) the font changes to Calibri 11. 

    Hi,
    Did you change the default font after you typed a few words in a note container?
    Setting the default font in Microsoft Office OneNote affects text that you type in new note containers only. It does not affect existing text or text that you add to existing note containers.
    If you want to change the font in an existing note container, you need to change it manually under
    Home tab > Basic Text.
    Thanks,
    Steve Fan
    TechNet Community Support

  • How to submit a form by pressing enter key

    Hi,
    I'm having a problem..............i have a form having text field and a button created using struts html tags..........when user enters the value and presses the button then the value is being taken...........
    but if the user enters the data and just presses enter key the form refreshaes but value is not submitted.............
    the button is created using <html:submit >tag.............can any one pls help me out with this???????????

    <script language="JavaScript">
    <!--
    var isNav, isIE
    if (parseInt(navigator.appVersion) >= 4) {
    if (navigator.appName == "Netscape")
    isNav = true
    else
    isIE = true
    function showKeyValue(evt) {
    var keyValue
    if (isNav)
    keyValue = evt.which
    else
    keyValue = window.event.keyCode
    /*status = keyValue*/
    if (keyValue == 13) {
    javascript:validateForm();
    return false
    </script>
    in the field call this method
    onKeyPress="showKeyValue(event)"

  • Using "Enter /Return" Key to submit a query

    All:
    I could not find any straight forward solution to my problem. I have report that has a search column (text) and I limit records based on the value entered in this text item. I have a "go" button that initiate the fetch. However, how do I achieve the same functionality when I press the enter key. Currently, when I press the enter key, it reports the following:
    ERR-1777: Page 5 provided no page to branch to. Please report this error to your application administrator.
    Restart Application
    Any help would be appreciated.
    Thanks

    Rajesh - If the only two ways to submit the page are to use the button or to press the Enter key in a text field, then you can simply remove the when-button-pressed condition from the page branch. Then the branch will fire now matter how the page is submitted. As it is now, the branch does not fire when the Enter key submits the page so the engine looks for the next branch that could be a candidate but fails to find one and you see the error message.
    Sometimes you need a page that is submitted by the Enter key to be handled as if a certain button (or "request" value) were pressed. In these cases, you can use javascript to make the Enter key set the request value to your liking. One way is to put code like the following in the page's HTML Header attribute, using "GO" as the request value in this example:< script type="text/javascript">
    <!--
    function submitenter(e)
    var keycode;
    if (window.event) keycode = window.event.keyCode;
    else if (e) keycode = e.which;
    else return true;
    if (keycode == 13)
       doSubmit('GO');
       return false;
    else
       return true;
    //-->
    </script>With this code, a page submitted with the Enter key would have a request value of "GO" and could be treated the same way as if a button with a request value of "GO" submitted the page.
    Scott

  • Invoking a command link's action from a javascript, on pressing enter key

    i have the foll java script function. on pressing enter within an input field i want a certain commandlink's action to be automatically performed:
    function checkKeycode() {
         alert("entered");
              var keycode;
              if (window.event) keycode = window.event.keyCode;
              //else if (e) keycode = e.which;
              if(keycode==13){               
                   alert("keycode: " + keycode);           
                   var x=document.getElementById("form10:link1");
                   alert("about to click");
                   x.click();
                   //document.forms[0].link1.click();               
                   //if(validate('form1:_system_username,form1:_system_password','form1:_id0,form1:_id1','2'))
                        //alert("about to submit page");
                        //submitPage();
         }This fn is being called from the input text as follows:
    <h:inputText styleClass="inputText" id="text1" size="32" onkeypress="checkKeycode();"></h:inputText>And the code containing the command link who's action i want to be called is:
    <h:commandLink styleClass="commandLink" id="link1"
                             action="#{pc_Test.doLink1Action1}">
                             <hx:graphicImageEx border="0" styleClass="graphicImageEx"
                                  id="imageEx1" url="../../images/search.gif"></hx:graphicImageEx>
                        </h:commandLink>
    The javascript is being entered as i get an alert saying that enter key was pressed. However it is not performing the action requried, saying that "null is null or not an object"
    could sumone please help????

    Hi
    From your javascript , it is known that this is only work in IE,
    And indeed it works fine, mybe there is another button which the default in your jsp
    Change your code like this:
    onkeypress="return checkKeycode();"
    and at end of your javascript return false when you call x.click
    Message was edited by:
    okoi80

  • How do I perform an action on return key press in an inputListOfValues?

    I know about the autoSubmit attribute, but I do not want to perform an action on a tab character or when exiting focus. Instead, I want to perform the same action as pressing a button when the user presses the return key in the input field. For example, an inputListOfValues for a search input, and a search button. When the user presses the return key, I would like the search to be performed. I'm sure that this can be done, I'm just not sure how. Thanks for any info.

    I did something similar, on an input box, not on an inputListOfValues, but I assume it should work the same way more or less. I got it from
    http://download.oracle.com/docs/cd/E15523_01/web.1111/b31973/af_event.htm#DAFBJGAH
    I used it for my login page so the user doesn't have to click on Login, just press enter after entering the password. I just had to map the corresponding method binding.
    BTW, the link above doesn't tell you have to add the javascript to the page. What I did was add an af:resource element inside of af:document.
    Hope this helps.

Maybe you are looking for

  • Populating a PDF form with XML data

    Hi folks, I would like to create some pdf form template, populate it with xml data and output from it a pdf file. Can I do such thing using LiveCycle? Yair

  • List of adapters missing

    Hi all, I dont find any adapter other than JPR in my current Adapter engine cache in RWB. I already found a thread regarding this but no perfect solution was provided. Now the problem I have sorted out is, as a result of the upgrade we found that the

  • Airport extreme base station and internet call waiting/caller ID

    I have dial up connection through Earthlink that includes the internet call waiting feature (a pop up window when I'm online showing an incoming call and the caller ID). It only works when I am dialed in directly through the modem on my computer but

  • Linux skype = Windows Skype

    We Want Linux skype to look like windows skype! If you agree with me comment and like this post!

  • Loosing the connection

    I keep on loosing the Apple TV from my device list in iTunes. Also my iPhone remote doesn't control it. In the setup menu of the apple tv the option of adding another remote stays grayed out all the time. Any ideas?