Did a tab key initiate exit event?

Hi,
I have a table on my form. If the user hits the tab key on the last field of the last row I want to add another row (as this happens in MS-Word tables for example).
My problem is: How do I find out what inititated an exit event on my field? Was it a tab key or did the user click with the mouse someplace else?
I would like to write something like
     if (xfa.event.trigger = "TABKEY") { ... }
Hope someone had had the same problem already.
Uli

Excellent. I tried it and it works! Thanks a lot!
Once you know the key word you find the right documentation. In case someone else has the same problems: Here is more information:
http://livedocs.adobe.com/livecycle/8.2/acrobat_designer/wwhelp/wwhimpl/common/html/wwhelp .htm?context=Adobe_LiveCycle_Designer_Help&file=001421.html
which is the same as
http://www.adobe.com/devnet/livecycle/articles/Adobe_XML_Form_Object_Model_Reference.pdf

Similar Messages

  • Make Enter key act like Tab Key

    Is there any way to make pressing the Enter key change the focus to the next field in the tab order? In other words, make the Enter and Tab keys act the same way?
    Thanks!
    Nelson

    Hitting [Enter] key triggers "exit" event, so add the following code appropriately xfa.host.setFocus(TabTo); where 'TabTo' is the field name to set the focus. However you do need to match with the tabbing order in the form just to make sure [Enter] and [Tab] keys function similarly.
    SekharN

  • [JS] Tab key event (ScriptUI)

    Hi,
    If set to 'window' or 'palette' type, a ScriptUI Window can't receive 'Tab' key events on WinXP.
    Is this the same with other OS?
    Is there a workaround?
    Thanks,
    Marc

    Here's the thread about the bug
    http://forums.adobe.com/message/2068532
    It really was and is a big problem for me and soesn't seem to be getting fixed any time soon
    Steven Bryant
    http://scriptui.com

  • Handling keyTyped events in JTable for TAB key

    In my app, I have a JTable. Some columns are non-editable.
    I have attached a keyListener to the table and have overridden keyTyped() and keyReleased() methods.
    In keyReleased(), I do something depending on the key code. For example: if its the VK_DELETE, I delete the row. If its some other user configured key, then I show a popup dialog where the user can enter some data, etc...
    In keyTyped(), I first check if the column is one of the specific columns. Then I get the keyChar. After this, I show a dialog and pre-populate a JTextField on this dialog with that keyChar.
    My issue is that 'TAB' key events arrive in keyTyped() and not in keyReleased(). As a result, the dialog is shown and the tab takes place inside the JTextfield which is incorrect.
    I would like to ignore TAB keyTyped events. When I look up the keyCode in keyTyped() method, it is 0. So there is no way for me to tell what key was typed.
    How can I ignore TAB events in my keyTyped() method?
    thx

    I now do the following to determine if TAB key has been typed
    public void keyTyped(KeyEvent e) {
    char c = e.getKeyChar();
    if (c == KeyEvent.VK_TAB) {
    Is this correct ?
    Edited by: tsc on Sep 28, 2007 12:40 PM

  • Tab key event not fired in JTabbedPane

    Hello,
    I wanted to add the functionality of moving between tabs when Ctrl+Tab is pressed like Windows tabs.
    But the tab key listener event is not getting fired by pressing Tab. For all the other key pushes it is working good. It this a problem with Java? Any workarounds?
    Here is the sample code:
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class TestTab extends JFrame
         public void drawGUI()
              //getContentPane().setLayout(new GridLayout(1, 1));
              JTabbedPane lTabbedPane = new JTabbedPane();
              JPanel lFirstPanel = new JPanel();
              lFirstPanel.add(new JLabel("First Panel"));;
              JPanel lSecondPanel = new JPanel();
              lSecondPanel.add(new JLabel("Second Panel"));;
              lTabbedPane.addTab("Tab1", null, lFirstPanel, "Does nothing");
              lTabbedPane.addTab("Tab1", null,lSecondPanel, "Does nothing");
              getContentPane().add(lTabbedPane);
              lTabbedPane.addKeyListener(new KeyAdapter()
                   public void keyPressed(KeyEvent lKeyEvent)
                        System.out.println(lKeyEvent.getKeyText(lKeyEvent.getKeyCode()));
              setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
         public static void main(String[] args)
              TestTab lTestTab = new TestTab();
              lTestTab.drawGUI();
              lTestTab.setSize(200, 200);
              lTestTab.setVisible(true);

    The KeyPressed events for TAB and CTRL-TAB are typically consumed by the KeyboardFocusManager for component traversal. What you have to do is adjust traversal keys and add CTRL-TAB as an action of your JTabbedPane. This is usually done with the InputMap/ActionMap, not a KeyListener:
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import javax.swing.*;
    public class X {
        public static void main(String[] args) {
            Set tabSet = Collections.singleton(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0));
            KeyStroke ctrlTab = KeyStroke.getKeyStroke(KeyEvent.VK_TAB, InputEvent.CTRL_DOWN_MASK);
            final int FORWARD = KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS;
            final JTabbedPane tp = new JTabbedPane();
            //setFocusTraversalKeys to remove ctrl-tab as a forward gesture
            tp.setFocusTraversalKeys(FORWARD, tabSet);
            for (int i=0; i<6; ++i) {
                JPanel p = new JPanel(new GridLayout(0,1));
                JTextArea area = new JTextArea();
                area.setFocusTraversalKeys(FORWARD, Collections.EMPTY_SET);
                p.add(new JScrollPane(area));
                area = new JTextArea();
                area.setFocusTraversalKeys(FORWARD, Collections.EMPTY_SET);
                p.add(new JScrollPane(area));
                tp.addTab("tab " + i,p);
            //add ctrlTab as an action to move to next tab
            Action nextTab = new AbstractAction("nextTab") {
                public void actionPerformed(ActionEvent evt) {
                    int idx = tp.getSelectedIndex();
                    if (idx != -1) {
                        idx = (idx + 1) % tp.getTabCount();
                        tp.requestFocusInWindow();
                        tp.setSelectedIndex(idx);
            InputMap im = tp.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
            im.put(ctrlTab, nextTab.getValue(Action.NAME));
            tp.getActionMap().put(nextTab.getValue(Action.NAME), nextTab);
            JFrame f= new JFrame("X");
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(tp);
            f.setSize(400,300);
            f.setVisible(true);
    [/code[                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Listening Tab Key Event On JTextField

    Hi
    i am unable to listen Tab Key Event on JTextField ....
    tField.addKeyListener(new KeyAdapter()
    public void keyPressed(KeyEvent e)
    if (e.getKeyCode()==e.VK_TAB)
    JOptionPane.showMessageDialog(null,"Tab Pressed");
    else
    JOptionPane.showMessageDialog(null,"Tab Not Pressed");
    When i pressed Tab Key then it dont come in KeyPressed Event ...Actually it go towards next FocusAble component ..
    Any help in this regard.....

    I also Checked it by using
    tField..setFocusTraversalKeysEnabled(false);
    tField.addKeyListener(new KeyAdapter()
    public void keyPressed(KeyEvent e)
    if (e.getKeyCode()==e.VK_TAB)
    JOptionPane.showMessageDialog(null,"Tab Pressed");
    else
    JOptionPane.showMessageDialog(null,"Tab Not Pressed");
    In this case each time e.getKeyCode() returns 0...
    plz help me

  • Unable to receive Tab key press event

    Hello,
    I have written a component which extends JComponent.
    For that , when Tab key is pressed I need to process something.
    I have overridden the function processKeyBinding in my class.
    But I am not getting any event for tab key press. For all the other key press events, the function is being called.
    I also tried to create a action and add it to the action map. But that is also not working.
    Can anyone explain me why it is not working and give me the solution.
    Thanks in advance,
    Anu

    public static void removeTabFromFocusTraverval(Component c) {
         int id = KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS;
         Set strokes = c.getFocusTraversalKeys(id);
         Set newStrokes = new HashSet(strokes);
         newStrokes.remove(KeyStroke.getKeyStroke("TAB"));
         c.setFocusTraversalKeys(id, newStrokes);
    }

  • Capturing the TAB key event.

    How can I capture the TAB key event?
    I am trying to use it within a JTextField to do a normal text tab operation.
    Thanks,
    D

    I want to map the Tab key to a jTextField so that when the user is editing inside the jTextField they can press the TAB key to tab over a predefined number of characters.
    Thanks,
    D

  • To trigger event or action on "TAB" key press on web dynpro view

    Hi, I need to trigger event on "TAB" key press on web dynpro view , is it possible?How?

    Hi Dipak
    What Madhu said is correct. Tab key is pre-configured to move cursor from 1 field to next field. we can not create an event on tab key press.
    Regards
    Gaurav

  • Initiate key pressing tab key

    it there a code for initiate key pressing...once i start
    the flash application pressing the "tab" key code should
    automatically be initiated.
    i don't want to do something while pressing the tab button.
    the tab button just has to be "pushed" automatically since
    this step is necessary in order to start an external application.
    otherwise the user has to push it.
    it is more "comfortable" when pushing the tab button is done
    automatically by flash, and the user only has to push the enter
    button to start the application.
    thanks for help....

    we have an application that will be started from a flash
    projector.
    the menue will be controlled not by mouse but by a remote
    control.
    you start the application when you press a certain key at the
    remote control that is "linked" with the enter key on the keyboard.
    now it is two steps: press the tab key to select the start
    button, and then press the enter key (both by remote control) to
    start the application.
    the first step is unnecessary when this could be done
    automatically by flash. then the user only has to press the enter
    key because the start button is already "selected".
    i can't explain it better... ;-(

  • Removing all tab key events

    Hallo all,
    I am having another problem with my JTables. Because our customer doesn't want to get out of JTable via Ctrl+TAB we have customized the TAB Key behaviour and it skips to the following component and it is fine. But if I go to a cell via TAB key (for example cell(3,4)) and if I select another component above via mouse button and go through the table via TAB key it focuses on the cell (4,4) instead of cell(0,0). How can I solve this problem? How can I refresh or remove the key listeners of the Table after I left the table via mouse? Can anyone help me?

    (Untested, and there may be a better approach)
    I would try adding a FocusListener and in the focusLost, something liketable.getSelectionModel().clearSelection();
    table.getColumnModel().getSelectionModel().clearSelection();luck, db
    edit No that didin't do it. Try this one:table.setRowSelectionInterval(0, 0);
    table.setColumnSelectionInterval(0, 0);Edited by: Darryl.Burke

  • How to make the TAB Key Event called

    Hi ,
    I want to make the tab key called twice when I hit on a button. It should jump to the next 2 cell.
    Thanks.
    DT

    Here's a couple related threads
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=583877
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=712386
    I'd also suggest exploring the Search Forums available on the left,
    which is how I found those threads:
    http://onesearch.sun.com/search/onesearch/index.jsp?qt=focus+traversal+tab+text&subCat=siteforumid%3Ajava57&site=dev&dftab=siteforumid%3Ajava57&chooseCat=javaall&col=developer-forums

  • Make Tab Key Press Event

    Hi You all,
    I'm trying to make an automatic Tab Key Press after fill some data to oEditText  , plz guide me how can i do that ?
    I will appreciate your help.
    Peter.
    Edited by: PeterHoang on Oct 12, 2011 12:22 PM

    Hi
    You can use sendkeys method for this
    SBO_APPLN.SendKeys("{TAB}")
    Regards
    Arun

  • Since installing LTR 5.4, which I've now upgraded to 5.6, I've encountered repeated slowness and malfunctions in operations, especially when using the Compare View function and the Tab key to open and close the right and left side panels.  Such problems n

    Since installing LTR 5.4, which I've now upgraded to 5.6, I've encountered repeated slowness and malfunctions in operations, especially when using the Compare View function and the Tab key to open and close the right and left side panels.  Such problems never arose during two years of using LTR-4 and nothing else has changed on my computer.  I have a pretty simple system with only a few plug-ins, which are usually not in operation.  I have 12GB of RAM in my Windows 7 PC.  I could illustrate these problems with screen shots if you would tell me how to submit screen shots.  Otherwise I will try to describe the problems in words.
    The problem is clearly cumulative, growing worse as usage time passes.  Compare View feature gradually slows down and eventually seems to choke as my work session proceeds. If I Exit LTR and re-enter and start all over, things will work normally for maybe 30 minutes, but then the Compare View feature begins to become very slow to respond.   In a recent example with my screen full of thumbnails in Library mode I highlighted two images to compare. LTR started to open the Compare View screen by first having the top row of thumbnails disappear to be replaced by the "SELECT" and "CANDIDATE" words in their spaces  (but no images), but Compare View never succeeded in gaining control of the screen. After some seconds the top row of thumbnails reasserted its position and the Compare View windows disappeared. But LTR kept trying to bring them back. Again the top row of thumbnails would go away, Select and candidate would reappear, try again, and give up. This went on for at least 2-3 minutes before I tried to choose File and Exit, but even that did not initially want to respond. It doesn't like to accept other commands when it's trying to open Compare View. Finally it allowed me to exit.
    To experiment I created a new catalog of 1100 images.  After 30-40 minutes, the Compare View function began to operate very slowly. With left and right side panels visible and two thumbnails highlighted, hitting Compare View can take half a minute before the two mid-size  images open in their respective SELECT and CANDIDATE windows. When the side panels are open and two images are in the Select/Candidate spaces, hitting the Tab button to close the side panels produces a very delayed response--25-30 seconds to close them, a few more seconds to enlarge the two images to full size. To reverse the process (i.e., to recall the two side panels), hitting Tab would make the two sides of the screen go black for up to a minute, with no words visible. Eventually the info fields in the panels would open up.
    I also created a new user account and imported a folder of 160 images. After half an hour Compare View began mis-placing data.  (I have a screen shot to show this.)  CANDIDATE appears on the left side of SELECT, whereas it should be on the right. The accompanying camera exposure data appears almost entirely to the left of the mid-screen dividing line. Although the Candidate and Select headings were transposed, the image exposure data was not, but the data for the image on the right was almost entirely to the left of the line dividing the screen in two.
    Gurus in The Lightroom Forum have examined Task Manager data showing Processes running and Performance indicators and they see nothing wrong.  I could also send screen shots of this data.
    At this point, the only way I can process my images is to work 30-40 minutes and then shut down everything, exit, and re-start LTR.  This is not normal.  I hope you can find the cause, and then the solution.  If you would like to see my screen shots, tell me how to submit them.
    Ollie
    [email protected]

    Since installing LTR 5.4, which I've now upgraded to 5.6, I've encountered repeated slowness and malfunctions in operations, especially when using the Compare View function and the Tab key to open and close the right and left side panels.  Such problems never arose during two years of using LTR-4 and nothing else has changed on my computer.  I have a pretty simple system with only a few plug-ins, which are usually not in operation.  I have 12GB of RAM in my Windows 7 PC.  I could illustrate these problems with screen shots if you would tell me how to submit screen shots.  Otherwise I will try to describe the problems in words.
    The problem is clearly cumulative, growing worse as usage time passes.  Compare View feature gradually slows down and eventually seems to choke as my work session proceeds. If I Exit LTR and re-enter and start all over, things will work normally for maybe 30 minutes, but then the Compare View feature begins to become very slow to respond.   In a recent example with my screen full of thumbnails in Library mode I highlighted two images to compare. LTR started to open the Compare View screen by first having the top row of thumbnails disappear to be replaced by the "SELECT" and "CANDIDATE" words in their spaces  (but no images), but Compare View never succeeded in gaining control of the screen. After some seconds the top row of thumbnails reasserted its position and the Compare View windows disappeared. But LTR kept trying to bring them back. Again the top row of thumbnails would go away, Select and candidate would reappear, try again, and give up. This went on for at least 2-3 minutes before I tried to choose File and Exit, but even that did not initially want to respond. It doesn't like to accept other commands when it's trying to open Compare View. Finally it allowed me to exit.
    To experiment I created a new catalog of 1100 images.  After 30-40 minutes, the Compare View function began to operate very slowly. With left and right side panels visible and two thumbnails highlighted, hitting Compare View can take half a minute before the two mid-size  images open in their respective SELECT and CANDIDATE windows. When the side panels are open and two images are in the Select/Candidate spaces, hitting the Tab button to close the side panels produces a very delayed response--25-30 seconds to close them, a few more seconds to enlarge the two images to full size. To reverse the process (i.e., to recall the two side panels), hitting Tab would make the two sides of the screen go black for up to a minute, with no words visible. Eventually the info fields in the panels would open up.
    I also created a new user account and imported a folder of 160 images. After half an hour Compare View began mis-placing data.  (I have a screen shot to show this.)  CANDIDATE appears on the left side of SELECT, whereas it should be on the right. The accompanying camera exposure data appears almost entirely to the left of the mid-screen dividing line. Although the Candidate and Select headings were transposed, the image exposure data was not, but the data for the image on the right was almost entirely to the left of the line dividing the screen in two.
    Gurus in The Lightroom Forum have examined Task Manager data showing Processes running and Performance indicators and they see nothing wrong.  I could also send screen shots of this data.
    At this point, the only way I can process my images is to work 30-40 minutes and then shut down everything, exit, and re-start LTR.  This is not normal.  I hope you can find the cause, and then the solution.  If you would like to see my screen shots, tell me how to submit them.
    Ollie
    [email protected]

  • KeyEvents with the TAB Key

    Hey All,
    I have a small progam with a small problem. My program is an applet with numerous textfields and I have implemented the KeyEvents event listener. What I want to have happened when I press the "Tab Key" is the cursor move from one tab to another, but when it goes to the next tab it clears out the text that is currently in the textfield. Take a look at my code segment that is giving me the problem.
    public void keyPressed(KeyEvent e)
    if(NameField == e.getSource())
              if(e.getKeyCode() == KeyEvent.VK_TAB)
                   SalaryField.setText(" ");
    I know that is works if I replace "VK_TAB" with something else like "VK_A". "NameField" and "SalaryField" are the names of mt textfields. I am currently using Java SDK 1.3.1 to program in java program, but my browser uses JVM/Runtime Enviornment 1.4.1. When I run it with my broswer nothing happens when I press tab and some for the program that I am using to progam in. I did a search in the forum and came up with I have above, but still cannot it to work. When I read APIs on 1.4.1 and 1.3.1 that both said that
    "Aside from those keys that are defined by the Java language (VK_ENTER, VK_BACK_SPACE, and VK_TAB), do not rely on the values of the VK_ constants. Sun reserves the right to change these values as needed to accomodate a wider range of keyboards in the future."
    What is going on? How can I solve this problem?
    Thanks,
    Iceman
    PS:
    My Interface is swing

    Hey All,
    Thanks for the help I got to work when I ran it with my programming program, but when I run it in a browser using the current JVM the tab key does not work. What is wrong now? Or how am I to use FocusListener now, I tried to use the getOppositeComponent(, my complier says that it is not a method of FocusListener. Even though java says in the docmentation that it is. Can I get some more help here. The questions again is How can I tab in a applet?
    Later,
    Iceman

Maybe you are looking for

  • Adobe Cloud Desktop App just spinning?

    Does anyone have any idea how to get the desktop app to work (Mac) when all I get is the blue spinning dial? I have uninstalled and reinstalled several times but to no avail? I am trying to update to the latest version of Muse. thanks.

  • Strange Itunes Problem? (Songs Will No Longer Play)

    Alot of my songs have just randomly stopped working lately. When I try to play certain songs nothing happens. They won't start playing (and there is no question mark next to the song asking me to locate the file). If I right click on the song and sel

  • Why is my calculated file size incorrect depending on bitrate?

    Hi, I have created a sequence in PPro CS4.  It is HD 1920 x 1080 - probably interlaced as it came from a Sony SR10 PAL camera. The sequence is 7 minutes long. When I encode it using Media Encoder CS4, I have set it to H264 and TS multiplex.  When I s

  • Why is there the error "The requested protocol does not exist comm:0" ?

    Hi all, I want to read data from a USB serial port of the mobile phone ( Alcatel OT-806D ). The cable connects the phone and the computer. The system running in the PC is Windows XP. I launch a java j2se program which writes a number to the usb seria

  • FTP in CS3 - no data sent to server

    Hi, I am no nearer solving my earlier problem, but this is just a plea to see in anyone out there has had a similar experience... Since Tuesday, when I uploaded some updates, things stopped working, in strange ways, on the site. Suddenly, sometimes t