Enter key press instead of tab key

I want to use enter key Instead of tab key in my page to move to next item
Please answer in detail steps because i am new to apex and especially to Javascript

I strongly advice against using an app like this.
I always play by the rule not to re-invent the wheel.
Try to convince the user from the new possibilities and the fact that tabbing is a default procedure.
You'll see that this will be easier than actually programming the enter-key to act like the TAB key.
I you really need to do this, then you'll need to do something like this
http://thinksimply.com/blog/jquery-enter-tab
good luck!
Regards,
Richard
blog: http://blog.warp11.nl
twitter: @rhjmartens
If this question is answered, please mark the thread as closed and assign points where earned..

Similar Messages

  • Enter key instead of TAB key

    Hi folks,
    I'd like to make the ENTER key behave the same way as the TAB key in
    the system I'm developing. I thought I would be able to do it by setting
    the ENTER as a function key (using Window.SetAsFunctionKey), and
    then after detecting an ENTER key press, request focus on the current
    fieldwidget's 'NextTabField'. However, this attribute defaults to NIL unless
    you override the default TAB sequence. And I don't really fancy setting
    the Next and Prev TabField for every onscreen field.
    Anyone done this before using a simpler method?
    By the way, I don't really want to get into a long thread about whether it is
    good practice to bypass Windows (TM) standards or not. We require
    fast data entry, and keyboard entry is essential for that.
    Cheers,
    Duncan Kinnear,
    McCarthy and Associates, Email: [email protected]
    PO Box 764, McLean Towers, Phone: +64 6 834 3360
    Shakespeare Road, Napier, New Zealand. Fax: +64 6 834 3369
    Providing Integrated Software to the Meat Processing Industry for over 10 years
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Duncan,
    The application we are building will replace legacy application and had similar
    requirements to accommodate the current users. We solved this problem by creating a
    special frame, appropriately named as the "Terminal Frame". It is distributed as
    part of the Scaffolds framework.
    The Terminal frame implements ENTER instead of TAB key. As you know the tabbing
    order in a terminal frame (top to bottom, left to right) is different than windows
    tabbing order (left to right, top to bottom). The Terminal frame solves the tabbing
    problem by constructing a "field traverse list" which includes all the fields in a
    window including nested views ordered according to their X,Y co-ordinates. It is a
    recursive method works on the same lines as described by Sakharov, Nickolay in
    earlier mail. The method also sets the NextTabField, PrevTabField references for
    each field in the traverse list.
    This framework is working very well for us. In a terminal frame world, you still
    have some user training issues as some of the fields (OutlineField, DropList,
    ArrayField, CheckBoxe etc.) behave differently for ENTER and TAB keys. But these
    are minimal compared to a complete change in style.
    Hope this is helpful.
    Good Luck,
    Shirish
    Duncan Kinnear wrote:
    On 22 Jun 99, at 23:47, Jeanne Hesler wrote:
    Do the math on this one. Be sure your users understand the cost and the
    lack of payback. I have no problem going against common practice when
    there is a good reason, but this reason just doesn't add up. Even if it
    did slow them down, which it won't, they would never lose enough time to be
    worth the work that it would take to implement.Jeanne,
    Thanks for your reply (even though it doesn't help me!).
    Don't get me wrong, I'm not advocating we abandon the TAB key
    functionality in favour of the ENTER key. I just want to ADD the ENTER
    key as a navigational aid for our 'legacy' users (and we have many). If it
    is done right, there should be no need to tell the user about it. Their
    transition to the new product would be virtually painless.
    Since I posted my original question I've realised that the cost of
    implementation is actually fairly low. And this is why. I have just
    discovered that the default tab order defined by Forte (left to right, top to
    bottom) is essentially useless for most of the windows we will be creating.
    Therefore, we will need to override it by explicitly setting the
    "NextTabField" and "PrevTabField" attributes of our input fields in virtually
    every window. As I am writing the framework for our new product, I will
    have to implement the facility to do this in the framework itself. And if we
    have our tab order defined, then adding the ENTER key functionality is
    minimal extra effort (see my original post). In fact, if I implement it in my
    "CoreWindow" (the root of my windows framework inheritence tree), then
    no-one will ever have to deal with it again.
    The TAB key is not even much of a windows data-entry standard. Many
    of our customers have defined secondary systems using Microsoft
    Access, and it uses the ENTER key (along with the TAB key) to move
    from field to field. Will these customers not complain that they cannot
    use the ENTER key to move between fields if we don't implement it?
    As we do not have the resources to completely rewrite our existing
    COBOL system (over 2 million lines of code) in one go. We will be rolling
    out the new system module by module. This means that a lot of our users
    will be switching between the new windows interface and the text-based
    unix telnet sessions. When I switch back and forth between windows
    editors and 'vi' on the unix host, I experience first-hand how mixed
    navigational facilities can hamper productivity!
    Anyway, I was just hoping there might be a little setting somewhere in
    Forte to switch this on, but as no-one has pointed it out, it seems unlikely.
    Thanks again for your input, lively discussion is always welcome.
    Cheers,
    Duncan Kinnear,
    McCarthy and Associates, Email: [email protected]
    PO Box 764, McLean Towers, Phone: +64 6 834 3360
    Shakespeare Road, Napier, New Zealand. Fax: +64 6 834 3369
    Providing Integrated Software to the Meat Processing Industry for over 10 years
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>--
    Shirish Kulkarni <mailto:[email protected]>
    Sage IT Partners <http://www.sageitpartners.com>
    44 Montgomery St. Suite 3200 San Francisco, CA 94104
    (925)210-6965 Office (415) 399-7001 Fax
    The Leaders in Internet Enabled Enterprise Computing
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Making ENTER key act as a TAB key.

    I have a version problem that I could not solve. My goal is using ENTER key as TAB key.
    In java version 1.3.X my code is working properly.It is like the code below
    public void keyPressed(KeyEvent e) {
    if(e.getKeyCode() == KeyEvent.VK_ENTER) e.setKeyCode(KeyEvent.VK_TAB);
    In java version 1.4.X it is not working. Can anybody help me please?

    Thanks a lot. It is really a good document that everybody should read.
    I have copied some portion of it for others searching about this topic.It is below.
    KeyListeners installed on Components will no longer see KeyEvents that map to focus traversal operations. Previously, AWT Components saw these events and had an opportunity to consume them before the AWT initiated focus traversal. Code that requires this functionality should instead disable focus traversal keys on its Components and handle focus traversal itself. Alternately, the code can use an AWTEventListener or KeyEventDispatcher to pre-listen to all KeyEvents.

  • Enter key to act like tab key in JTable

    I have programmed a JTable application. I want that if I press 'Enter' key in the JTable cell, the cell at right side may be selected after validating input. Similarly, when I press 'Enter' in the right most cell, the first cell of the next row may be selected after validating input.
    In other words, I like 'Enter' key to behave as forward navigational key in JTable cells like 'Tab' key, however, after validating input.
    The following is the piece of code which is not working for me. Though, it changes selection border to the next cell on pressing enter, but the focus is not shifted and editing remains in the current cell.
    //voucherTable is a JTable object with three columns.
    Action moveForward = new AbstractAction() {
    public void actionPerformed(ActionEvent e) {
    int r=voucherTable.getSelectedRow();
    int c=voucherTable.getSelectedColumn();
    if(c==2){
    c=-1;
    r+=1;
    voucherTable.changeSelection(r,c+1,false,false);
    voucherTable.getInputMap().put(KeyStroke.getKeyStroke
    (KeyEvent.VK_ENTER,0),"moveForward");
    voucherTable.getActionMap().put("moveForward",
    moveForward);
    Kindly advise me to solve the problem.
    Thanks.
    Mujjahid

    KeyStroke tab = KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0);
    KeyStroke enter = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0);
    InputMap im = table.getInputMap(JTable.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
    im.put(enter, im.get(tab));

  • Shouldn't this Enter Key do same as Tab key?

    I am trying to have the Enter key switch the focus between these 2 JTextField. (like the Tab key), but I can't get it to work.
    Any advice, please?
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    class TestGUI extends JFrame{
         JPanel panel = new JPanel();
         JTextField field01 = new JTextField("Test 1");
         JTextField field02 = new JTextField("Test 2");
         TestGUI(){
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              panel.add(field01);
              panel.add(field02);
              getContentPane().add(panel);
              field01.setBounds  (125,120,23, 50);
              field02.setBounds  (100,120,23, 50);          
              setBounds(200,50, 300, 300);
              KeyStroke tab = KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0);
              KeyStroke enter = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0);
              InputMap im = field01.getInputMap(JTextField.WHEN_FOCUSED);
              im.put(enter, im.get(tab));
              addWindowListener(new WindowAdapter() {
                   public void windowActivated(WindowEvent e) {
                        field01.requestFocusInWindow();
              setVisible(true);
         public static void main (String[] args){
              new TestGUI();
         

    But how could I get rid of the warning for unchecked operations, when I am compiling it?
    Set<AWTKeyStroke> keystrokes = new HashSet<AWTKeyStroke>();And if you have more than two fields on the panel which all should react to <Return>, use setFocusTraversalKeys(...) once for the panel; there's no need to attach it to each field.
    And there's no need to add a windowListener to place the cursor. Just put the line
    field01.requestFocusInWindow();after setVisible(true);

  • Since Last 15 days, whenever I press 'shift' or 'tab' key, a sidebar opens automatically in browser. So what could be the solution to turnoff this shortcut.

    sidebar

    Try using Firefox's safemode does that help ?
    * [[Troubleshoot Firefox issues using Safe Mode]]
    Also try disabling all your plugins
    * use Tools -> Add-ons -> Plugins <br/> and disable each one, you may then need to restart.
    Possibly a screenshot of the sidebar would help us to understand what you are seeing
    * [[How do I create a screenshot of my problem?]]
    I note K7 Web Protection Browser Extension is in use. I am not familiar with that plug-in. Is that causing this ?

  • How to alter behaviour of pressing enter key to tab key?

    Hi! I want to alter the behaviour when pressing the enter key so it acts like pressing the tab key in a JTextField. That is pressing the enter key will transfer the cursor to the next field instead of the cursor just staying in the current field.
    Thanks in advance.
    rralilin

    Hi,
    there are more than one way to do this:
    1. use an ActionListener and transfer the focus in its actionPerformed(...) method - good for one or a few JTextFields - if there are more, try ...
    2. prelisten the key events via the new KeyboardFocusManager und replace the corresponding key event by a Tab-key-event and redispatch it - this approach enables you, to handle this new behavior for all JTextFields in one central position - possible since JDK 1.4
    Hope, this helps
    greetings Marsian

  • Enter key as Tab Key in a JTable

    How can I have the Enter Key act as a Tab Key in a JTable?

    thnx...but I already solved my problem. In case someone has the same problem:
    final InputMap im = table.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
    final KeyStroke key = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, false);
    im.put(key, "selectNextColumnCell");

  • The correct approach to intercept TAB key

    Dear Experts,
    I have developed a GUI out of javax.swing. The GUI consists of JFrame, several JPanels and javax components, such as JTextField, JLabel, JComboBox, JTable and many more.
    Now, I want to change the behavior when user presses TAB key. By default TAB key moves focus from a component to another component. How can I disable this?
    I come to two alternatives that I am not sure which one is the correct approach. Could you please advise me?
    Alternative 1.
    Use key binding on GlassPane.
    Alternative 2.
    Use event-handling on GlassPane.
    If those alternatives are not the best one, could you please provide another alternative?
    I have tried the following, but they didn't work...
    Action doNothing = new AbstractAction() {
        public void actionPerformed(ActionEvent e) {
            System.out.println("Tab-key is pressed.");
    cmbPCode.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "doNothing");
    cmbPCode.getActionMap().put("doNothing", doNothing);or
    getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "doNothing");
    getRootPane().getActionMap().put("doNothing", doNothing);where cmbPCode is a JComboBox that receives focus when the GUI shows up.
    Thanks for your help,
    Patrick
    Edited by: Patrick_Stiady on Mar 31, 2009 6:51 AM

    Thank you for the advice. I am developing an application where the user is not computer literated, so that I have to limit functional key as many as possible and only allow several keys to be active. For example, I don't want TAB key to change the focus, instead I want TAB key to do nothing.
    I have tried keybinding, because I think this is the most relevant, but somehow I failed to recognize which component should be bound with keybinding. I have tried to change the input map of the component that receives the focus when the GUI is displayed (cmbPCode) as can be seen on my first post. I also tried to change the input map of the root pane. Both are not successful.
    Now, I wonder whether
    1. it does not work because the key is not consume()?
    2. Or should I use key listener, which I would only use if keybinding were unable to serve my goal?
    3. Or should I learn how to intercept key on the glass pane?
    4. Is keybinding able to nullify default action, such as changing focus by TAB key? I am asking this, because I'm going to nullify other important key such as ENTER key.
    Thank you for any guidance,
    Patrick

  • How to recognize the tab key in a JTextField

    I have a drawing program with a main window and a tools palette, which is a JDialog. The tools palette has JToggleButtons and one JTextField. When you have the focus in the JTextField and you press tab repeatedly, it tabs through all the JToggleButtons and then back into the JTextField.
    However I would like to recognize the pressing of the tab key and ask for the focus to go back to the main window.
    I subclassed the JTextField, added a KeyAdapter, but it does not recognize the tab key. I also added the processKeyBinding method, but it doesn't recognize the tab key either.
    How can I recognize the tab key?
    Here is a self-contained test program that illustrates the problem:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class AnanyaCurves extends JFrame
      Tools tools;
      public AnanyaCurves(Dimension windowSize)
        Basics.ananyaCurves = this;
        enableEvents(AWTEvent.WINDOW_EVENT_MASK);
        setTitle("Ananya Curves");
        tools = new Tools(this);
      public static void main(String[] args)
        int toolsWidth;
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        toolsWidth = 200;
        Dimension windowSize = new Dimension(screenSize.width - toolsWidth, screenSize.height - 58);
        AnanyaCurves ananyaCurves = new AnanyaCurves(windowSize);
        ananyaCurves.pack();
        ananyaCurves.setBounds(toolsWidth, 0, windowSize.width, windowSize.height);
        ananyaCurves.setVisible(true);
        ananyaCurves.requestFocus();
      public void setVisible(boolean b)
        tools.setVisible(b);
        super.setVisible(b);
    class Basics extends java.lang.Object
      public static AnanyaCurves ananyaCurves;
      public Basics()
    class Tools extends JDialog
      JToggleButton btnGrid;
      JTextField textGrid;
      JPanel panel;
      public Tools(JFrame frame)
        super(frame, "Tools", false);
        enableEvents(AWTEvent.WINDOW_EVENT_MASK);
        btnGrid = makeBtn("Grid");
        textGrid = makeTextField();
        panel = makePanel();
        pack();
      public JToggleButton makeBtn(String name)
        JToggleButton btn = new JToggleButton();
        btn.setMaximumSize(new Dimension(108, 24));
        btn.setPreferredSize(new Dimension(108, 24));
        btn.setText(name);
        btn.setFont(new Font("Verdana", Font.PLAIN, 11));
        btn.setMargin(new Insets(5, 10, 5, 10));
        btn.setOpaque(true);
        return btn;
      public ACJTextField makeTextField()
        ACJTextField textField = new ACJTextField();
        textField.setFont(new Font("Verdana", Font.PLAIN, 12));
        textField.setMaximumSize(new Dimension(108, 20));
        textField.setPreferredSize(new Dimension(108, 20));
        textField.setText("0.25");
        textField.setEnabled(true);
        return textField;
      public JPanel makePanel()
        JPanel panel = new JPanel();
        panel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
        panel.add(btnGrid);
        panel.add(textGrid);
        getContentPane().add(panel);
        return panel;
    class ACJTextField extends JTextField
      KeyAdaption keyAdaption;
      public ACJTextField()
        super();
        keyAdaption = new KeyAdaption();
        this.addKeyListener(keyAdaption);
      class KeyAdaption extends KeyAdapter
        public void keyPressed(KeyEvent event)
          int keyCode = event.getKeyCode();
          if (keyCode == KeyEvent.VK_TAB)
            Basics.ananyaCurves.requestFocus();
      protected boolean processKeyBinding(KeyStroke keyStroke, KeyEvent keyEvent, int int2, boolean boolean3)
        int keyCode = keyEvent.getKeyCode();
        if (keyCode == KeyEvent.VK_TAB)
          Basics.ananyaCurves.requestFocus();
          return false;
        return super.processKeyBinding(keyStroke, keyEvent, int2, boolean3);
    }Thanks for looking at this.

    Wow, Michael, you work like magic! Thanks so much! I would be happy to give you a commercial key to my Ananya Curves program also once the second release is on my website. It's a program for drawing curves in an easier way without pulling on tangent lines, with all control points right on the curve. Just send me an email to [email protected] if you are interested!

  • How to supress tab key stopping at lables

    Hi everyone,
    after upgrading to 5.0 from 4.02 and changing the theme to 26 (productivity), there is now a problem with the tab key.
    Before, the tab key moved the entry scope simply to the next dialog field or list value; now the tab stops also at the labels.
    That means, to skip from one entry field to the next, you have to press tab twice.
    How can I change this back to the old way ?

    Norbert W. wrote:
    thank you for your response. I came from theme no.2 (Builder blue). I´ve tested this case with Firefox and Chrome (actual versions). The label templates are mostly "Optional with help", "Optional" and "Required with help".
    Now I found that "optional" is working as expected (without tabstop), while the others are producing stops.
    This is happening because the "with help" label templates contain links for displaying item-level help, and they therefore receive focus when using keyboard navigation. This is actually good accessibility practice, and you are recommended to retain it. Changing labels so they don't use "with help" templates where there is no help is also appropriate.
    The workaround used to avoid this standard behaviour in theme 2 is to include a tabindex attribute with a sequence number higher than the possible number of page items on the help links:
    <label for="#CURRENT_ITEM_NAME#" id="#LABEL_ID#" tabindex="999"><a class="optional-w-help" href="javascript:apex.theme.popupFieldHelp('#CURRENT_ITEM_ID#','&SESSION.')" tabindex="999">
    You could revert to this behaviour by editing the theme 26 "with help" label templates to include the tabindex:
    <label for="#CURRENT_ITEM_NAME#" id="#LABEL_ID#" class="uOptional"><a class="uHelpLink" href="javascript:apex.theme.popupFieldHelp('#CURRENT_ITEM_ID#','&SESSION.')" tabindex="999">

  • Tab key creates a circle

    New to pages and this is driving me nuts. Why does each press of the tab key leave a small circle on the page?

    managed to answer this myself. It's just certain fonts that do it e.g. Batang and Gulim.

  • Controlling amount of space inserted with tab key

    Currently I get a style="margin-left: 40px;" added when I press the tab key.
    How can I change that amount to an additional 24px for each successive pressing of the tab key?

    Apfelwurm wrote:
    Yes, I understand that the photos take up a certain amount of space.
    We'll have to find out why.
    You could also sync your iPad without syncing any photos.
    Afterwards you can sync the photos again, but not before you have assured yourself that the photos do not take up an abnormal amount of space in the original directory on your Mac. And I mean the OS of your Mac, not 3rd party software.
    Does software written by Apple as part of the OS count as 3rd-party software?
    And I'm not sure why you are so focused on finding out the size of the individual files beyond what I've already stated.  iTunes and the iPad report 76 photos as taking up 3.96GB (or 3.95GB) of space.  None of those 76 files are that large.  This is after multiple soft and hard resets and multiple restores.
    I certainly don't own a camera capable of taking pictures where one photo takes up 53MB of space.  In addition, none of the 76 pictures come from a camera that I own.  They are all small files downloaded from websites that I have manually saved.  As I stated, the files range in size from 13.7KB to 1.2MB.  All small files.

  • How to use Ctrl + -- or Ctrl + -- key to act as Tab or Tab + Shift

    In JDK 1.4, I try to use Ctrl + --> key to act as Tab key, and use Ctrl
    + <-- key to act as Tab + Shift key, I would like to find a solution
    for whole application instead of adding key listener for each individual
    component, how to implement it easily? Any suggustions? Thanks!

    Not sure if this will help, but you can listen for all AWT Events by adding a AWT Listener to you class. Here is an example that listens for MouseEvents:
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    class TestEventQueue extends JFrame
         public TestEventQueue()
              Toolkit.getDefaultToolkit().addAWTEventListener( new AWTEventListener()
                   public void eventDispatched(AWTEvent e)
                        System.out.println(e);
              }, AWTEvent.MOUSE_MOTION_EVENT_MASK + AWTEvent.MOUSE_EVENT_MASK  );
         public static void main(String[] args)
              JFrame frame = new TestEventQueue();
              frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
              frame.setSize(200, 200);
              frame.setVisible(true);
    }

  • How to disable the Tab key?

    Hi,
    Usually,the most end users select partners name or code by the Tab key or pickers, how can I disable Tab key? I want users to select a partner by user-defined values.
    Best Regards!

    Hi,
    We donu2019t have a provision for disable the tab key in B1.
    If you are assigning user defined value in any field, magnifying class will be displaying.
    You should give a KT to end user that donu2019t use tab key, instead of tab key please click on magnifying class in those filed.
    Thanks and Regards,
    Senthil Maruthappan.
    Team Work Never Fails
    Edited by: Senthil Maruthappan on Jul 4, 2009 11:16 AM

Maybe you are looking for

  • Oracle 817 client and MS driver for oracle

    Hello I had installed oracle 8.17 client on my machine. Suddenly, my datasource with "MS driver for oracle" seems not to be working. I uninstalled 8.17 and installed 8.16. No matter, what I do, I cannot get the datasource setup with "MS driver for or

  • TS3152 Im using 10.7.4 and looking for a way to change the streaming port on quicktime x

    Im using 10.7.4 and looking for a way to change the streaming port on quicktime x used to be able to do via system preferences > quick time > advanced But cant find these settings anymore Thanks Pavi

  • Built-in iSight stops working on iMac--try re-setting SMU

    I spent about two hours trying to figure out why my built-in iSight stopped working--all of a sudden it would show only a green screen in Photo Booth, black in iChat and not at all in iVideoHD, and not really register as available. It did show up in

  • Can BPM visualize business process at runtime?

    I am new to BPM. I am wondering if it can visualize the business process at run time so that the user knows what is going on. A use case would be in a document approval process, where a document needs to be approved by multiple people in different ph

  • Career

    Hi Experts, I am new to sap domain.i hv done training in abap. i want to know about the career options in sap can u tell me which is good functional tester, devoloper, consultant.   which one is good and interesting for career