Use Return Key to trigger function?

I've got a little form in a movieclip where the student is to
do some simple subtraction, then click the Record button to enter
the data into a table. Problem is that if someone types in the
answer, they naturally want to hit the Return key to enter the
data, however, it instead puts a carriage return in their answer
and when they try submitting with the Record button, it checks
their answer and it is now wrong since the added carriage return
does not match the answer they should have. Is there any way to
make the Return key trigger the recordIt() function? Here is my
code:

Here is what I ended up adding:
stage.addEventListener(KeyboardEvent.KEY_DOWN,keyDownListener);
function keyDownListener(e:KeyboardEvent) {
if ((e.keyCode == Keyboard.ENTER) && (diameter.text
!= "") && (difference.text != "")) {
recordIt(e);
}

Similar Messages

  • Use of KEY-OTHERS trigger

    Hi,
    I have a form that has numerous triggers defined at the form level. The form has a block that appears in a dialog window. The block should only have a small subset of triggers that are defined at the form level. I went ahead and created the key triggers necessary at the block level; I also defined a key-others trigger defined as null on the block to disable all other key triggers defined at the form level???. However it's not working, key triggers at the form level are still firing. Is the key-others trigger suppose to suppress triggers at a lower level or do I have to specifically deactivate all the key triggers at the block level?
    Thanks for you help in advance

    Key-Others at the block level will only override a form-level Key-Others. It will not override any other form-level triggers.
    You must either override all the form-level triggers at the block level, or add code to the beginning of each form-level trigger such as:
    If :System.trigger_block = 'MY_SPECIAL_BLOCK' then
      Return;  -- exit if in the special block
    End if;

  • Keyboard "use F-keys as standard function keys" setting gets reset on system restart

    Hi all,
    I have set in system preferences -> keyboard to "use f1, f2 etc. keys as standard function keys" or rather I want to keep this setting set but unfortunately this gets reset on each restart-
    I'm wondering what happened, this used to work initially with Lion. I may have set somewhere something that resets this on each start but I have no clue what that might be.
    Machine iMac mid 2011, keyboard Apple alu keyboard with cable (pre-Lion layout).

    Thanks BDAqua...sure looked like the function had disappeared over time and appreciate the confirmaion. Hard to understand why a function like that would be taken away. The program I run uses function keys f3,f7,f11 and f23(shifted f11) and I have all working okay by turning them off in keyboard and mouse menus. The f23 is causing issued in that when I use shifted f11 the screen scrolls upward instead of passing along the f23 function. Looks like I will have to work around this since the operating system will not allow the function keys to just work "standard"...thanks by the way for the welcome...!!

  • Return key disabled when using safari with Mavericks OS X

    Hi,
    Has anyone got a way to use return key when using safari??

    niall1111 wrote:
    It is,and always was, the return key that did this in snow leopard and other operating systems!
    ??? I have two Macs that can run Snow Leopard & in neither of them does the return key take me back a page. Also, nowhere in the lists of keyboard shortcuts for OS X or any of the browsers I use (Safari, Firefox, & Chrome) is the return key mentioned as providing this shortcut.
    Some web pages may have been programmed to respond to the return key that way, but not many I have ever encountered are. I guess it is possible some extension or other third party add-on might provide that function, but itis definitely not something that has ever been built into OS X or any of the common browsers used with it.
    In Safari (on Snow Leopard, Lion, Mountain Lion, & Mavericks) two keyboard shortcuts are provided by default to go back a page: one is the CMD-[ combination Barney already mentioned. The other is CMD + the left cursor key. Likewise, CMD+] or CMD + the right cursor key will take you forward a page (if you have previously gone back to a previous page).

  • Return key won't work

    The return key will not function under one profile on my intel Imac. Enter key works fine and return key works under other profiles. Any thoughts on what is changed in the one profile to prevent it from working? Thanks in advance.

    Hello and Welcome to Apple Discussions ...
    Repair Disk Permissions.
    Launch Disk Utility. (Applications/Utilities) Select MacintoshHD in the panel on the left, select FirstAid, then click: Repair Disk Permissions.
    Reset the System Management Controller: http://support.apple.com/kb/HT1543
    From the Apple Menu click Software Updates. Make sure you are up to date.
    Try a different USB port.
    If your iMac is under warranty, and nothing helps... take it in for service.
    Carolyn

  • Key-Others Trigger (Please help!!!)

    Hi everybody,
    We are trying to restrict the end user from pressing some
    'dangerous' keys, i.e clear block, execute query, even the DOWN
    key causes us problems in some (1 record) blocks.
    I know there is a way to do it using Oracle terminal but it
    seems that we need greater degree of flexibility.
    I certainly don't want to go to every <KEY> trigger on every
    form (block) and put null; statements there. I know from Oracle
    Docs that I'm supposed to use the key-others trigger..
    So here are my questions:
    1.Is there any way to find out which key has been pressed?
    2.Can someone post a sample code of a KEY-OTHERS triggers?
    3.Is there another way to achieve what we need?
    Thanks is advance for any help.
    Mike
    null

    You have two options.
    1) Turn off all keys not wanted. This is what you said
    you did not want to do.
    2) Tun on all keys you want to use by creating a trigger for
    each key. i.e.
    trigger KEY-NXTREC trigger KEY-UP
    NEXT_RECORD; UP;
    Then turn off all keys not explicitly turned on.
    trigger KEY-OTHERS
    NULL;
    ET (guest) wrote:
    : Hope that it may be helpful.
    : Answer :
    : 1. In command line, add debug option so that you may know what
    : trigger is executing.
    : e.g. runform module= userid= debug=yes
    : 2. Sample code for Key-others trigger
    : null;
    : Rgds,
    : ET
    : Mike Braude (guest) wrote:
    : : Hi everybody,
    : : We are trying to restrict the end user from pressing some
    : : 'dangerous' keys, i.e clear block, execute query, even the
    : DOWN
    : : key causes us problems in some (1 record) blocks.
    : : I know there is a way to do it using Oracle terminal but it
    : : seems that we need greater degree of flexibility.
    : : I certainly don't want to go to every <KEY> trigger on every
    : : form (block) and put null; statements there. I know from
    : Oracle
    : : Docs that I'm supposed to use the key-others trigger..
    : : So here are my questions:
    : : 1.Is there any way to find out which key has been pressed?
    : : 2.Can someone post a sample code of a KEY-OTHERS triggers?
    : : 3.Is there another way to achieve what we need?
    : : Thanks is advance for any help.
    : : Mike
    null

  • Return key not creating a new line when using the horizontal text tool

    Going through the adobe after effects 'classroom in a book' examples - when writing a line of single line using the horizontal text tool pressing return does not create the next line underneath, the cursor stays on the same line?
    Anybody out there had this problem?

    Hi Bill
    Thanks for replying!
    My OS is windows 7. I think it is the first time I have needed to put more than one line of text in an after effects layer. I am new to CS5.5 - after effects and I'm going through an adobe tutorial  'classroom in a book' series book.
    I thought about using a paragraph text box as you suggest but could not find the function in the tools menu.
    I have since tried clearing the cache out and restoring default layout but with no joy.
    I have used the return key for multiple line text in premier pro and it works perfectly ok.
    Cheers,
    Alan

  • Function key to execute key-f5 trigger

    Dear all,
    I have migrated a forms 6i to 10gR1 and I would like to call existing KEY-F5 trigger by pressing a function key (F5) on the keyboard.
    How to do that?
    I have tried several things with the file fmrweb.res but without any success yet.
    Anyone to help me?
    Thanks and best regards,
    Sebastien

    I found the solution by using key accelerator
    Thanks and best regards,
    Sebastien

  • How can I use Automator to toggle the Function Keys?

    I am trying to create a Automated process to toggle the Function Keys on my keyboard. This is because I use several programs, including After Effects, which use the F1-12 keys, but when I am not using that program I commonly use the Apple-defined shortcuts on the keyboard. I have a full-sized keyboard, hence no Fn key. So that's out right away – I've read several comments on this topic where people suggested that this is the ONLY option. I refuse to beleive that.
    Automator contains a "Watch Me Do" feature, which I have tried to use to record this process. Problem is, it never clicks the right object. If I record clicking the dock, the magnification (I suspect) throws off the virtual-controlled mouse and picks the wrong object. If I record the Apple Menu route, it gets it about 1/2 the time.
    I think what I'm really looking for is a console command I can feed into the Terminal which toggles the keys. It seems to be that this HAS to be an option, even if it is more than one line of commands. I believe if I can feed this process into Automator, it would work.
    Any ideas?
    Thanks in advance, Mac Geniuses!

    iKey lets you define function keys per application. You seem to want to turn on & off the defined apple keys.  Not sure if these keyboard re-mappers will do the trick.
    Here is my other most favored application. Of course, I haven't checked these out in newer OS's. I'm a Tiger man myself.
    iKey is a front end program that simulates typing and mouse movements. I use iKey to remap the Function keys.
    "iKey is an automation utility, a program that creates shortcuts to accomplish repetitive tasks. In essence, an iKey shortcut is a little program in its own right, but you don't need to know the first thing about programming to create an iKey shortcut. All you have to do is put together three necessary parts of a shortcut: One or more commands that give the shortcut its functionality, a context in which it runs, and a launcher that defines how the shortcut is activated."
    http://www.scriptsoftware.com/ikey/
    iKey  has a little more function then the previous free version called youpi key. For many years, I used youpi key before switching to iKey.  It works fairly well for me in MAC OS 10.4 although not officially supported.  The youpi key download is hard to find & no longer here.
    http://www.versiontracker.com/dyn/moreinfo/macosx/11485&vid=75326
    ( Send me a message for a copy of youpi  key. )
    *Examples:*
    I have the common programs that I use assigned to function keys. I have F4 assigned to Firefox. When I want to start FireFox, I press F4. When I want to switch to firefox, I press F4! Starting & switching to an application in Mac OS are the same thing in Mac OS.
    Here is an example of to assign volumn control to a function key.
    http://discussions.apple.com/message.jspa?messageID=10361085#10361085
    Here is my script for listing my application folder. I have it assigned to function-key 6.
    tell application "Finder"
       open folder "Applications" of startup disk
       select Finder window 1
       set bounds of Finder window 1 to {-3, 44, 691, 545}
       --set position of Finder window 1 to {33, 44}
       set position of Finder window 1 to {60, 45}
       activate
    end tell
    The second portion of this script was generated in the script editor record mode. After I recorded the script and did some editing, I copy the script to ikey/youpi key.
    Full Key Codes
    http://download.cnet.com/Full-Key-Codes/3000-2094_4-44175.html
    Spark
    "Spark is a powerful, and easy Shortcuts manager. With Spark you can create Hot Keys to launch applications and documents, execute AppleScript, command iTunes, and more... You can also export and import your Hot Keys library, or save it in HTML format to print it. Spark is free, so use it without moderation!"
    http://www.versiontracker.com/dyn/moreinfo/macosx/22675
    Mac OS X remap or rename keyboard keys
    by vivek
    So how do you remap or rename keyboard keys under Mac OS X?
    Simply use DoubleCommand software.  It is a free program
    http://theos.in/apple/download-doublecommand-to-remap-keyboard-keys/
    Keyboard Maestro is a powerful macro program for Mac OS X (including Tiger and Leopard) which has received glowing reviews. Keyboard Maestro will take your Macintosh experience to a new level in “Ease of Use”. With Keyboard Maestro you can design a custom action sequence with your own shortcuts and use them at any time, you can navigate through running applications and open windows with Program Switcher, and you can work with an unlimited number of clipboards - all by pressing simple keystrokes.
    http://www.keyboardmaestro.com/main/
    "Spark is a powerful, and easy Shortcuts manager. With Spark you can create Hot Keys to launch applications and documents, execute AppleScript, command iTunes, and more... You can also export and import your Hot Keys library, or save it in HTML format to print it. Spark is free, so use it without moderation"
    http://www.versiontracker.com/dyn/moreinfo/macosx/22675

  • Can I use the value returned from a Text Function in another Formula?

    I'm writing a report in Hyperion System 9 BI + Financial Reporting Studio version 9.2. I have 2 grids in my report.
    Grid1 Column A is set up as a text function using the function type - <<GetCell("Grid2", 1, a, 1)>>. I would like to use the values returned from this text function in Column A (Grid 1) in a formula in Column B (Grid 1).
    Is it possible to use the values returned in Column A of the text function in another formula? My report does not seem to recognize Column A as numerical values, even though the values to be returned are numerical.
    If so, how do I recognize the values in Column A Grid 1 as numerical values and not text?
    Thanks for any help you can offer!

    Hi Edson,
    Yes you need to use the CALC_ERROR macro function to be able to test whether the last macro function returned an error. CALC_ERROR will return an 'X' if there an error occured during the execution of the last macro function.
    You can use a macro similar to the following:
    IF
      CALC_ERROR( )
      = 'X'
          DO SOMETHING HERE
    ENDIF
    Let me explain how this works internally. The SAP system maintains a global variable g_flg_calc_error during the execution of macros in the planning book. The g_flg_calc_error variable will contain the value of f_calc_error that was set by the last macro function which executed. The ABAP coding of a planning book is something like this:
    data: g_flg_calc_error type /SAPAPO/FLAG.
    * SAP will pass g_flg_calc_error variable to all macro
    * functions. When SAP calls a macro function, it does
    * something like this.
    call function '/SAPAPO/MACRO_FUNCTION_HERE'
            exporting
              plob_values      = i_s_adv_plob_values
              sdp_book         = g_c_advf_sdp_book
              sdp_view         = g_c_advf_sdp_view
            tables
              cols_index       = i_t_cols
              value_tab        = l_t_value_tab
            changing
              f_calc_error     = g_flg_calc_error
    As you can see, the g_flg_calc_error variable
    is passed in the "changing" part of the call. The macro  function being called can then use the f_calc_error
    variable to change the value of the global
    g_flg_calc_error variable. In fact, the macro function being called can also check (by looking at the f_calc_error variable) if the last macro function reported an error.  The CALC_ERROR macro function just checks the value of f_calc_error parameter (w/c in fact is the value of the g_flg_calc_error variable) and returns "true/X" if the f_calc_error was set to true by the last macro function.
    Hope this helps in clearing things out

  • ITS mobile - Enter / Return key function in windows mobile

    Hi,
    I am using ITSMOBILE with a RF gun. I have developed screens but when using ENTER key on the RF device, it does not work. I have checked in IE6 and it works. It seems it is an issue with the RF device.
    Does anyone have an idea to resolve this issue.
    Regards,
    Emmanuel

    Hi Ganesh,
    What browser are you using?
    In your situation I believe you are tryuing to use function keys with an Internet Explorer on Windows Mobile? Up to Windows Mobile 6.5, IE does not support the OnKeyPress Event.
    This issues needs to be solved by using an industry Browser which remaps the KeyPressed Events to javascript functions.
    You will need to use an Industrial Browser I.E the Motorola Symbol PocketBrowser which should be available with Symbol MC9090 device
    Then you can have the key mapping according to the technical manual of you Industrial Browser.
    Regards,
    Oisin
    Edited by: Oisin ONidh on Dec 21, 2011 3:57 PM

  • [SOLVED] How to use return parameter of function as paramter of table?

    Hi all,
    As continue of post "ADF Faces: how to execute pl/sql function when page is loaded." I came up with an other problem where I can't find an easy solution for.
    The problem is easy.
    1) I execute a procedure, this returns a value
    2) I have a table which needs one input parameter
    3) How can I bind the return value of the procedure to the input paramter of the table:
    A simple example:
    1) I created a pl/sql function that returns 1
    CREATE FUNCTION zz_return_1
    is
    RETURN NUMBER
    BEGIN
      RETURN 1
    end;2) I exposed the function in my TestModule so I can use it on a jps page.
    3) I created a table TEST_PARAM_1_TABLE with two columns: a, b
    4) I created a view read-only object with one paramter
    SELECT a,b
    FROM zz_scn_test_tab
    where a = :var_15) I added the view object to a jps page as tabe > adf read-only
    6) I added a methodAction and invokeAction to execute the function on page load
    <executables>
          <iterator id="zzscntest1Iterator" RangeSize="10" Binds="zzscntest1"
                    DataControl="TestModuleDataControl"/>
                <invokeAction id="runProc" Binds="ftn_return_1"/>
          </executables>
    <bindings>
          <methodAction id="ftn_return_1"
                        InstanceName="TestModuleDataControl.dataProvider"
                        DataControl="TestModuleDataControl"
                        MethodName="ftn_return_1" RequiresUpdateModel="true"
                        Action="999" IsViewObjectMethod="false"
                        ReturnName="TestModuleDataControl.methodResults.TestModuleDataControl_dataProvider_ftn_return_1_result"/>
          <table id="zzscntest1" IterBinding="zzscntest1Iterator">
              <AttrNames>
                  <Item Value="A"/>
                  <Item Value="B"/>
              </AttrNames>
          </table>
    </bindings>how can I bind the return value of the function to the var_1 variable of the table?
    Additional to this: Is there a way to store the return value in a managed bean?
    for example: if I create a managed bean:
    public class globalVars {
        private Number ftnReturnValue;
        public globalVars() {
        public void setFtnReturnValue(Number ftnReturnValue) {
            System.out.println("return value is set to: " + ftnReturnValue);
            this.ftnReturnValue = ftnReturnValue;
        public Number getFtnReturnValue() {
            return ftnReturnValue;
    }how to store the return value in this ftnReturnValue variable?

    Thanks to Frank,
    I finally got it to work!
    For those with the same problem, this is what I did:
    - I created a VO material_details with one parameter :sequence_num
    - I created a master/detail viewlink from my materials list to the materials_details
    - In the application module, I created a call to the procedure, and within this procedure, I set the sequence_num variable.
        public Number f_ltf3_adf_syf_init(String reporting_group
                                         , String username
                                         , String RAG_code
                                         , String ABC_class
                                         , String SBU_code){
           CallableStatement st = null;
           String stmt = "M_LTF3_SFM_CALC.f_ltf3_adf_syf_init('"+ reporting_group
                                                           +"','"+ username
                                                           +"','"+ RAG_code
                                                           +"','"+ ABC_class
                                                           +"','"+ SBU_code+"')";
           try {
               // prepare the statement
               st = getDBTransaction().createCallableStatement("begin ? := "+stmt+";end;",0);
               st.registerOutParameter(1,2);  // register output parameter as Number
               //execute the statement
               st.executeUpdate();
               //set paramter in detail VO of master/view
               getLtfSyfRevDetails1().setNamedWhereClauseParam("session_seq", (Number)st.getObject(1));
               return (Number)st.getObject(1);
           }catch (Exception e){e.printStackTrace();}
           return null;
        }

  • Return Key doesn4t make my defined KEY-ENTER trigger to fire.

    I4ve found that the trigger that fires when I press Return is KEY-NEXT-ITEM,but this doesn4t resolve my problem,because the tab key also fires this trigger.
    I want to navigate within textitems with the tab key and that when I press return key make an action on the values entered in the items.
    mila, PJR

    You have to perform key mapping to get the Key-Enter trigger to work.
    Open your forms90\fmrweb.res file in a text editor. Find the line:
    10 : 0 : "Return" : 27 : "Return"
    Change it to:
    10 : 0 : "Return" : 75 : "Return"
    Save the file and run the form again. The key-enter trigger should then fire when you press the Return key, but not when you press the Tab key.

  • Use all F1, F2, etc. keys as standard function keys

    Does anyone know where this option is in Snow Leopard?

    I guess the computer is not recognizing your keyboard as having a function key.
    I'm not sure if it's a bug in Snow leopard or if the keyboard needs a new Snow leopard compatible driver which would have to be provided by the manufacturer. try searching for it.
    if a system does not recognize a keyboard as having a function key it will not display an option to use F-keys as standard keys. I have a white mac pro keyboard at work without a function key and I don't have that option on my mac at work.

  • Use Function Keys as Standard Function Keys checkbox missing

    Is there a reason the "Use Function Keys as Standard Function Keys" checkbox is missing in my Keyboard/Mouse settings?

    Just go to the Keyboard shortcuts tab and uncheck the items assigned to the function keys or assign them to different keys.

Maybe you are looking for

  • RAM ISSUES A215-S7407 - PSAFGU-01V002 SUSPEND MODE ERROR WITH 4GB RAM

    Hi, im having some troubles with my laptop. Because it comes only winth 1GB RAM (512MB x 2) i decided to give it an upgrade to 4GB (Max Capcity) according to specifications details on the support site. So i bought two (2) DIMM Modules KINGSTON 2GB 66

  • How to insert ORACLE HINT into select statement....

    Hi team, Can you please suggest me how to add an Oracle hint to point the Program to BSAD~1. Index BSAD1 has all three fields MANDT, BUKRS, AUGDT which are there in the where clause. But as per the execution plan index BSAD0 is being used which is th

  • How to know threads status

    Hello all! I want to know if all my threads are done. I wrote some code but when I run it have this errors: Exception in thread "AWT-EventQueue-0" java.lang.IllegalMonitorStateException         at java.lang.Object.wait(Native Method)         at java.

  • Table for Appraisal Template

    Hi, What is the table name where Appraisal Templates are stored. Samriddhi

  • Transport of Query successful, but changes not appeared in the report

    Hi All, I have 2 Queries(Normal and Total stock reports on the same InfoProvider) in Prd. For that User asked me to add one characteristic to Free characteristics. I added one characteristic in Free Characteristics to both Queries in Dev and i collec