DOWN Traversal out of JTextArea using SHIFT+ENTER key combination.

Hi folks
I slightly modified the focus-traversal code presented in Java Tutorial (http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html) to replace the CTRL+TAB combination with SHIFT-ENTER (because it is easier to type) but the code does not work. The code in the tutorial works for just ENTER key only. Am I making any mistake? Can anyone help me on this?
Thanks in advance.
Asif

Thanks for your reply, Srinath. Following is the code (in hyphenated borders):
=====================================================================
Set forwardKeys = getFocusTraversalKeys(
KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS);
Set newForwardKeys = new HashSet(forwardKeys);
newForwardKeys.add(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, InputEvent.SHIFT_DOWN_MASK));
setFocusTraversalKeys(KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS,
newForwardKeys);
=====================================================================
Can you help me now? I would really appreciate it. Thanks
Asif

Similar Messages

  • Using the enter key on an editable table

    Hi,
    I'm using 11g adf and I can't figure out how to get past this:
    When going through an editable table (with editingMode="editAll") using the enter key, it will stop after a certain number of rows, equal to the value of fetchSize. If I want to go down further, I have to scroll down another way to make it fetch the next set of rows, it won't go to the next row with the enter key. It simply won't execute the query to fetch the next rows.
    Increasing the fetchSize will just delay the problem to a row further down (and decrease the performance since the fetch operation can take quite a bit longer).
    I've tried to put a clientListener on both the table or the inputText fields to intercept the enter key, but that won't work when the table is in editable mode.
    Is there any way to fix this problem?

    Hi,
    I've tried to put a clientListener on both the table or the inputText fields to intercept the enter key, but that won't work when the table is in editable mode.
    The clientListener needs to be on the inputText fields. Then in JS you need to call a server listener which will check if the current row is already at the range end and if calls NextSet (you can provide this as a method binding). Unfortunately after this you will need to PPR the table to show the new rows. This is how I would try it.
    Frank

  • How can I use the enter key instead of tab to change field focus?

    I am using Acrobat 9 Pro.
    We have a fillable PDF where the users enter numbers into fields.  They want to be able to use the <enter> key on the 10-key pad instead of the <tab> key on the keyboard to move the focus to the next data entry field.
    How can I set my PDF so that it recognizes the <enter> key instead of the <tab> key for changing focus?
    Thanks!

    You can use a custom Keystroke script, something like:
    // Custom Keystroke script for text field
    if (event.willCommit && event.commitKey === 2) {
        getField("Text2").setFocus();
    Where "Text2" is the name of the next field. This doesn't disable the Tab key though. For more information, see: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.608.html

  • I can't use the 'Enter' key to take me to a website I've typed into the nav bar - I have to use the mouse to click on the 'go' arrow. Why? How do I fix this?

    I can't use the 'Enter' key to take me to a website I've typed into the nav bar - I have to use the mouse to click on the 'go' arrow. Why? How do I fix this?

    See:
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • Using the Alt Key combination

    Hi,
    I am using the alt-key combination, Alt-9734, to produce this star ☆ in a marquee I created in DW 5.5. Works fine in IE but not Safari or Chrome. In these two browsers the star is showing as,
    ☆  ☆  ☆   , any ideas. Thanks,
    Frank

    You could use the following html entity code in your source view where you want the star, remove the spaces...
    & # 9734 ;
    or
    & star ;
    Here's a  reference page for all of the other speical characters..
    http://dev.w3.org/html5/html-author/charref

  • Can you change iMessage to not use the enter key to send a message on a macbook pro?

    I'm using a mac with OS X Yosemite version 10.10.1 and I'm wondering if you can somehow change the settings of iMessage so that when you press the enter key it doesn't send the message. Thanks if you can help.

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • IChat will not let me use Return/Enter key to send IM.  Just makes sound?

    OS 10.5.2. iChar launches fine. I double click name I want to send IM to. Type a message, then hit Return to send the message. It will not send. I here system sound when I use Return or Enter key on 2nd or 3rd attempts. 1st attempt, no sound. So, I can't send messages.
    I repaired permissions and trashed the 4 iChat preference files in my preference folder.
    Not sure what I have done but Return key is fine. Works in Skype and all other apps. iChat just does not like it so no way to send messages.
    HELP.....
    Thanks
    tj

    Quit iChat.
    Open Terminal (Applictaions/Utilities)
    Copy and Paste Bold text
    /Applications/iChat.app/Contents/MacOS/iChat -errorLogLevel 7
    Hit Enter.
    This will cause iChat to be started up and create a Log in Terminal which may tell us more.
    Do what you normally do to send text messages.
    Do what you do to Quit iChat.
    Grab All of the Log.
    Quit Terminal.
    Post log here. It will be long. If you want to split it do so around the bit that says if it found UPnP and your router's name.
    Make sure the bits cross over when you post.
    8:25 PM Saturday; March 8, 2008

  • Using the enter key to break the line

    Numbers 3.2, any way to edit this keyboard shortcut? It's not convenient to use alt-enter all the time? Such a simple thing to ask, I can't actually believe this app does not have this feature.

    I've looked but am having trouble finding a preference or some other setting in Numbers 2 (the previous version) that allows remapping this key.
    You can easily modify keyboard shortcuts for Numbers 3 for any menu pick just the way you can for any other OS X application via System Preferences > Keyboard > Shortcuts.
    But what you are discussing here is not a keyboard shortcut.  It's entering a specific character into text, not executing a command.  Remapping your keyboard may do the trick for you.  Have you tried?
    SG
    P.S. We're all just fellow users here.  If you wish to communicate with Apple, choose Numbers > Provide Numbers Feedback in your menu.

  • Write alt - enter key combination to file?

    how would I create a string with the <alt>-<enter> key combiniation in the middle of it which I can then write out to a file? Would it be as simple as outputing the unicode characters for <alt> and then <enter>?

    There's no such thing as a character for alt or enter. They're sometimes called meta-keys, and what an application does when they are pressed is up to the application. Usually enter creates a line break, but even then, the characters that make up a line break are platform dependent.
    Explain what you are trying to accomplish, and we can probably suggest a better way to do it.

  • Story desktop crashes when using the enter key

    This started happening today.
    I can reliably trigger the problem by opening a screenplay, going to the end of a line and hitting enter.
    I get a dialogue box that states: "We're sorry, but Adobe STory has encountered an unrecoverable error and must shut down."
    The report details are as follows:
    <ErrorReport date="Fri, 17 Jan 2014 08:07:41 GMT">
    <documentMeta userRole="owner" documentVersion="0"/>
    <error message="TypeError: Error #1009">null</error>
    <command name="vu.editor.controllers.selection::CmdTypeText" phase="onExecute"/>
    <platform version="WIN 11,9,900,169" playerType="Desktop" os="Windows 8" isDebugger="false"/><trace></trace></ErrorReport>
    Oddly enough, this is not triggered if I hold the shift key and hit enter.

    Hi,
    Sorry for the inconvenience.
    Could you please save your script as stdoc ('File->Save to disk') and send it at DL-AdobeStory-support<at>adobe<dot>com so that we can debug the issue and suggest a workaround.
    Thanks
    Rashi

  • Shift Enter isn't working.

    When I use Shift Enter to go down one space, I get an error message saying the Visible Elements needs to be checked; it is.  If I just enter i get to wide of a space.  I need the shift enter back.  I also get an error saying afterSave is not defined.  I can't find afterSave in my code.  All this happened at the same time, but I'm not sure what I did to create this problem.  I'm self taught and don't speak tech language.  If you can help me, please keep it simple for me.  Thank you kindly.

    You probably deleted the 'Shift + Enter Line Break' shortcut from your DW preferences.
    If you're using Windows, You need to go to Edit > Keyboard Shortcuts > Menu Commands/ Insert
    Then make a code snippet for the xhtml BR and then make Shift + Enter as shortcut
    If you're using a Mac, You need to go to Dreamweaver (from topmost Menu bar) > Keyboard Shortcuts > Menu Commands/ Insert
    Then make a code snippet for the xhtml BR and then make Shift + Enter as shortcut
    This should revive your 'Shift Enter' shortcut.

  • Traversing Focus By Enter Key

    Please Try to Help Me on this ............
    I Have a Screen where I need to traverse focus (it has textfields, combo boxes and buttons) when I press the Enter Key (like Tab).
    I used a Key listener and was able to do it (to a certain point)
    The code I have written is below ..
    Now The problem is when the focus sets on a JComboBox, it wont go further (tab works). I know that the enter key in a JComboBox is used to select a item.
    So what I need is first to be able to select an item using the enter key and when press enter key again, the focus must go to the next component.
    Is there a way to do it ???
    (JCheckBox and JButton has similar problems)
    SymKey aSymKey = new SymKey();
    textfield1.addKeyListener(aSymKey);
    textfield2.addKeyListener(aSymKey);
    combobox1.addKeyListener(aSymKey);
    combobox2.addKeyListener(aSymKey);
    checkbox1.addKeyListener(aSymKey);
    textfield3.addKeyListener(aSymKey);
    button1.addKeyListener(aSymKey);
    class SymKey extends KeyAdapter {
    public void keyPressed(KeyEvent e){
    if (e.getKeyCode() == e.VK_ENTER) {
    if (e.isShiftDown())
    FocusManager.getCurrentManager().focusPreviousComponent((JComponent)e.getSource());
    else
    FocusManager.getCurrentManager().focusNextComponent((JComponent)e.getSource());

    Hi,
    You need to implement the focusmanager, and set currentfocusmanager with your focusmanger.Then it works out.Because Jcombobox is editable the keyevent of the combobox executes .
    Hope it helps.
    venkat

  • How to change shift+enter to be newline in Messages

    I use a few chat message programs on Mavericks but the Messages app is the only that doesn't use Shift+Enter for a new line and sends the half written message instead.
    Enter & Shift+Enter in messages does the same thing.
    Is there a way to change the keyboard shortcut so that Shift+Enter gives a newline instead of sending the message?
    Thanks,
    M

    Hi,
    Like you I have long used th ALT/Option+Enter keys to produce new lines/paragraphs in iChat and Messages.
    This set of keystrokes appear nowhere in the menus.
    I did create a shortcut for Mail when it had no Keystrokes for adding a Link.
    Now that the current Mail App does have CMD + K I get the System Error sound when I want to use the one I created.
    This suggests that even if you added a Shortcut keystroke in System Preferences > Keyboard > Shortcuts tab it would not work.
    7:32 pm      Saturday; August 30, 2014
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • Enter Key cannot be used in find examples!!!

    I always use the enter key to enter or open a file/folder. But in LabVIEW example finder its not at all working.. Is there any special reason for not allowing the Enter key???
    The best solution is the one you find it by yourself

    In the NI Example finder...
    The best solution is the one you find it by yourself

  • Using "Enter Key" on Button launches new window

    I've written a Google Search portlet using the Google API. The user enters a Search Term in a text box and then clicks on a button to begin the search. It works fine as long as the user clicks the button with the mouse. However, I'm finding that many times they just use the enter key thinking its also mapped to the button. The search works, but now displays the results in a new page leaving the portal. How can I get the "Enter Key" to operate the same way as mouse clicking on the button?
    Paul

    Here's what I have in my Page_Load (if you're using aspx) that traps the Enter key. In my case I just ignore it, but you can obviously replace the function body to do whatever you want.
    this.RegisterStartupScript("captureEnterKey", "<script for=document event=onkeydown>if (event.keyCode == 13) {return false;}</script>");

Maybe you are looking for

  • Serious problems including battery overheating

    My dad and I both bought Revolutions and have had the same issues with our phones (listed below). We truly believe that the LG Revolution is a defective phone - what are the odds that we would both get "lemons"? While at the Verizon store on 3/13, th

  • What's the difference between Acrobat and Livecycle?

    I'm creating forms for a very large company. What's the difference between Livecycle and Acrobat? I have been creating them in Livecyle - they need to be filled out and emailed (not just the data, the completed form). Can I create it in Livecycle and

  • Will MM-SUS scenario work perfectly if we replicate SUS vendors from SRM

    Dear Gurus' We are going to use MM-SUS scenario in our classic implementation of SAP SRM. However, we are not replicating the SUS vendors directly from MM system using BD14. Instead, we are replicating the SUS vendors from SRM system by ticking the '

  • SMARTFORM CODE

    Hi all, I've never done sartor till now. can any of you send me the code as to how to start with smartforms in real time scenarious. i ve been following this way. please suggest me whether my approch is correct.Is there any other special conditions t

  • Confirmation Links in ESS Applications

    Hi All, I want to move the confirmation links from top to bottom. In all ess Services  confirmation pages the links are shown on the top , I wanted to move those links to bottom of the screen. Any suggestions on how to do that. Thanks Ravi