Remove the Enter key binding from a JPopupMenu

Hi,
Does anyone know how to remove the Enter key binding from a JPopupMenu?
So when the popupmenu is showing and you type Enter, nothing should happen and the menu should stay where it is.
I have tried:
popup.getActionMap().put("enter", null);
popup.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "enter");but the popup always disappears.
Any ideas?
Cheers,
patumaire

First of all, that is not the proper way to "remove" a key binding. Read the Swing tutorial on [How to Use Key Bindings|http://java.sun.com/docs/books/tutorial/uiswing/misc/keybinding.html#howto] for more information.
However, we still have a couple of problems:
a) the input map is dynamically built as the popup menu is displayed
b) the input map is built for the root pane, not the popup menu
The following seems to work:
popup.show(...);
InputMap map = getRootPane().getInputMap(JTable.WHEN_IN_FOCUSED_WINDOW);
map.put(KeyStroke.getKeyStroke("ENTER"), "none");
KeyStroke[] keys = map.allKeys();
for (int i = 0; i < keys.length; i++)
     KeyStroke key = keys;
     Object action = map.get( key );
     System.out.println(key + " : " + action);

Similar Messages

  • How can I remove the "enter" key from the keyboard? (New Macbook)

    I have the last white macbook, I spilled beer in a couple of keys, I managed to removed them without problems, but I can't find the way to remove the Enter Key, and there is no help on internet Anyone?

    What characters are you talking about exactly and why would you want to remove any?
    There is really no way to modify Apple's keyboards or add your own in iOS, but there are some apps that may provide a work around.

  • How do I remove  the enter key on the numeric keypad as a command key?

    How do I remove the enter key on the numeric keypad as a command key.  I want to use the enter key as a return key.

    Don't.  It will void the warranty.  Take is to an Apple store or an AASP and have them do it.

  • Apple, why did you change my Keyboard and remove the enter key?

    Hi all,
    I had my new black MacBook delivered just before Christmas. The keyboard has changed from my previous Black MacBook (the one a colleague poured wine over and killed... grrr).
    Apple have changed the look of the command key and removed the Apple logo (very sad), but more frustratingly have replaced the 'enter' key with another 'option' key.
    I found the 'enter' key really useful, especially for pull down menu and really miss having one.
    Does anyone know if there is a way to assign the new 'option' key to be an 'enter' key?
    Cheers
    Scott.

    I just received a new(refub) MacBook 2.2GHz today and was very disappointed to find the enter key missing. After selling my G4 PowerBook six months ago, I was so looking forward to having the convenience of being able to slap the enter key for dialog boxes with and submitting forms without having to move my hand from the trackpad. I hope that someone will come up with a way to replace the functionality of the missing enter key.
    Which brings me to my next point- There has been a big oversight in the implementation of the MacBook's replacement of the Enter Key, which is to use the FN+Return keys. It seems that when using the FN key with the Return key, the system will ignore the Command key being invoked. I discovered this very quickly. Anyone who uses Apple Remote Desktop knows that in order to send a Unix command to a remote machine, you type the command in the 'send UNIX command' window, then hit Command+Enter to send the command. Return produces a carriage return, FN+Return does nothing, and FNCommandReturn does nothing. The only current work around is to use the track pad to the "Send" button and click, which really slows things down.

  • I removed the ENTER key and can't get it back on

    Hi,
    Approximately 2 months ago i removed a few keys off my Macbook Pro to clean them. I managed to replace all of them except for the ENTER key.
    Underneath the casing there are 2 plastic bases which scissor. These bases attach via hooks on the main keyboard. I managed to get one back on but i can't get the other base back on. The enter key itself still works but without the housing on top.
    Went i went to the genius bar i was told because t was out of warranty they would charge me or if i went back to the retailer (Tesco) they would fix it within the 6 year european consumer law. The genius said that he could see it had not been mistreated and it shouldn't be a problem. When i consequently called Tesco they told me they wouldn't as it was user damage and that i should go back to Apple because when Tesco arrange repairs they get Apple to do them anyway.
    Im a little tired of heading backward and forward between the two companies and no one is helping. I just want my key back on.
    I have a mid 2012 Macbook Pro. i5 Processor, 4GB Ram, 500GB HDD.

    Make sure that you do not run Firefox in full screen mode (press F11 or Fn + F11 to toggle; Mac: command+Shift+F).<br />
    If you are in full screen mode then hover the mouse to the top to make the Navigation Toolbar and Tab bar appear.<br />
    You can click the Maximize button at the top right to leave full screen mode or right click empty space on a toolbar and use "Exit Full Screen Mode" or press F11.<br />
    *http://kb.mozillazine.org/Toolbar_customization
    *https://support.mozilla.com/kb/Back+and+forward+or+other+toolbar+items+are+missing

  • How can I prevent forms from being prematurely submitted when users click on the  "Enter" key?

    Is there any way that I can prevent Dreamweaver CF submission forms from being prematurely submitted by the user when he/she clicks on the "Enter" key before they have completed the form?  I need the users to finish form and click on the "Submit" key.  I have the "Submit" key action configured as "submit form"

    Thank you!
    Found a solution through Google.

  • The enter key is not working in firefox but it has working fine in chrome and IE so please help me to rid out from this.

    The enter key is not working in firefox but it has working fine in chrome and IE so please help me to rid out from this.

    Hello gokulaan, '''try Firefox Safe Mode''' to see if the problem goes away. Safe Mode is a troubleshooting mode, which disables most add-ons.
    ''(If you're not using it, switch to the Default theme.)''
    * You can open Firefox 4.0+ in Safe Mode by holding the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * Or open the Help menu and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    ''Once you get the pop-up, just select "'Start in Safe Mode"''
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    ''When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.''
    Thank you.

  • New install of SQL 2014 Std MSDN. Get "The SQL Server product key is not valid. To proceed, re-enter the product key values from the Certificate of Authenticity (COA) or SQL Server packaging."

    Trying to install a new version of SQL 2014 Std 64 or x86. Installing on Windows 8.1Pro 64bit machine.
    I get:
    "TITLE: SQL Server Setup failure.
    SQL Server Setup has encountered the following error:
    The SQL Server product key is not valid. To proceed, re-enter the product key values from the Certificate of Authenticity (COA) or SQL Server packaging.
    Error code 0x858C0017."
    I looked at the summary log and that is the only error.
    I made sure there were no other instances of SQL on this machine. Uninstalled all VS2013 and sql instances just in case. IF there is somewhere to check if a previous version or license is causing the issue, i would be glad to check.
    Any help would be appreciated.

    Hi,
    Please read this thread with similar issue
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/bdd94577-515c-49fa-be44-008eacece057/installing-sql-server-2012-on-a-new-vm-error-code-0x858c0017?forum=sqlsetupandupgrade
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Articles

  • I just downloaded (updated) Firefox to V 20.0.1 now the "search" does not work, either via the mouse click or the enter key. Windows XP.

    Updated to latest version, V 20.0.1 Now when on the home page the "search" does not function with mouse click or the enter key. Currently running XP Service pack 3. I also have the same problem (after same firefox update at home with my HP laptop running Windows 7.

    You can check if you still have the XML files of the default search engines including Google in the searchplugins folder in Firefox program folder.<br />
    If not then you need to reinstall Firefox.
    Try to use the SearchReset extension to reset some preferences to the default values.
    *https://addons.mozilla.org/firefox/addon/searchreset/
    Note that the SearchReset extension only runs once and then uninstalls automatically, so it won't show on the "Firefox > Add-ons" page (about:addons).
    Try to delete the search.json file and a possible search.sqlite file in the Firefox profile folder.
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    Firefox will rebuild the search.json file from the default search engines in the searchplugins folder in the Firefox program folder and the searchplugins folder in the Firefox profile folder.
    Do a clean reinstall and delete the Firefox program folder before reinstalling a fresh copy of Firefox.
    Download a fresh Firefox copy and save the file to the desktop.
    *Firefox 20.0.x: http://www.mozilla.org/en-US/firefox/all.html
    Uninstall your current Firefox version, if possible, to cleanup the Windows registry and settings in security software.
    *Do NOT remove personal data when you uninstall your current Firefox version, because all profile folders will be removed and you will also lose your personal data like bookmarks and passwords from profiles of other Firefox versions.
    Remove the Firefox program folder before installing that newly downloaded copy of the Firefox installer.
    *It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.
    *http://kb.mozillazine.org/Uninstalling_Firefox
    Your bookmarks and other profile data are stored in the Firefox profile folder and won't be affected by an uninstall and (re)install, but make sure that "remove personal data" is NOT selected when you uninstall Firefox.
    If you keep having problems then also create a new profile.
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    *http://kb.mozillazine.org/Profile_backup
    *http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Clean_reinstall

  • My MacBook Pro keyboard is giving trouble. 0,p,;,/ and the enter key needs to be pressed several times before registering. Help me please??

    My MacBook Pro keyboard is giving trouble. The 0,p,;,/ and the enter key, needs to be pressed several times before registering. Help me please??

    If you are still under warranty and/or have AppleCare, call them.  Let them deal w/it.  Out of warranty, your keyboard may need cleaning.  Use a vacuum hose or a can of compressed air to get the dirt out from under the keys.  For instructions to remove the keys if it comes to that check out the following websites:
    iFixit
    TakeItApart
    Search YouTube for Macbook Pro “How To” tutorials.
    If you do not want to DIY, take your MBP to your local AS or an AASP.

  • Since upgrading to Firefox 10.0.2 my AVG extension has had to be disabled, as after typing in any web address in the address bar, the enter key had no effect and I could not go to the site without pressing the Reload arrow on right.

    I have recently upgraded Firefox to the latest version 10.0.2. After that I could not enter any website address and press the enter key and get to the website, nor could I select a website from the dropdown list of previously visited websites. The only way I could get there was by pressing the arrow on the right side of the address box (Reload current page). Once I disabled the AVG extension, everything worked normally. As soon as I enabled the AVG extension, it stopped working again.

    Follow these steps for the controls to work:
    # Start > Programs > Mozilla Firefox > Mozilla Firefox
    # Find the “Tools” menu at the top of the browser window and select “Add-ons”.
    # Click on the “Extensions” icon to make sure you’re in the correct option menu.
    # Locate “AVG Safe Search” and click on the containing line to highlight and select the add-on.
    # Click the “Disable” button and close the Add-ons window.
    # Close down any Firefox windows you may have open.
    # That’s It – You’re Done!

  • 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 to go around the enter key

    Hi all,
    I have the data show on the grid. I modified it and didn't press the enter key, the commit
    (save) icon in the navigator bar doesn't high light.
    Is there a way to go around that? Make it high light whenever the data change.
    Thanks
    null

    expanding on that same logic, I removed both pauses and now it does run without having to press enter at the beginning or the end.  I haven't added the /Y yet, but I don't get a message about overwriting the existing file.  For this sample,
    it's not important, but I will remember that for down the road.  Thank you so much!
    Thanks for the feedback. Note also that
    "echo off
    should read
    @echo off
    The prompt instruction serves no purpose.

  • Removal of  Developer Key entry from DEVACCESS Table.

    Hi,
    On table DEVACCESS, in QTY/DEV/Prod there is one person with Developer Key listed that I would like to remove,  User is no more working and now we want to delete the entry from this table which has the User name followed by the Developer key assigned.
    Could any one guide me in deleting the Developer Key access from the DEVACCESS table.
    Satish.

    Another alternative is to use SE11 to create a maintenance view (ex: ZV_DEVACCESS).  Secure the maintenance view with a custom authorization group.  With the maintenance view you have the ability to use SM30 to maintain the DEVACCESS data.
    That keeps the DEVACCESS table from changing and thus no need to register the change with SAP.
    Cheers,
    Brian

  • How can I remove the authorize 5 computer from my iTunes?

    How can I remove the authorize 5 computer from my iTunes?

    Deauthorize one computer
    Open iTunes on the computer you want to deauthorize.
    Choose Store > Deauthorize This Computer.
    You might need to show the menu bar to see this option in Windows. In earlier versions of iTunes, you can access this option from the Advanced menu.
    Enter your Apple ID.
    Click Deauthorize.
    If need to deauthorize your computer but you can't access it, you need to deauthorize all computers. After you authorize 2 computers, you'll have the option to deauthorize all computers for your Apple ID. You can deauthorize all computers once per year.
    Deauthorize your computer using iTunes - Apple Support

Maybe you are looking for

  • How do I "pull" date-referenced data from one table to another?

    I have two tables: DateNamesTable and DisplayTable. DateNamesTable has two columns: OrigDate and Name. Data could look like this (ugly dashes used for "column" spacing, sorry): OrigDate - - - - Name 1/12/1983 - - - James Smith 2/7/2006 - - - - Paula

  • As of this morning, Firefox no longer opens .doc files

    Firefox 5 At first I thought it was a problem on my machine, but then tried firefox on a completely separate computer and have the same problem. As of this morning, Firefox no longer sends .doc files to Word. It asks whether you want to save or find

  • Thinking of cancelling all 8 contracts because of the RAZR

    I have had my Driod Razr ever since it first came out. I was never really impressed with it to begin with because the battery life is AWFUL....even with the help of apps like JuiceDefender and Advanced Task Manager- it dies within a few hours of usag

  • Problem Installing Oracle Linux 6.3 - 'Disc not found message box'

    I'm trying to install Oracle linux on a old laptop. Single disk drive. I downloaded V33412-01Oracle Linux Release 6 Update 3 Boot iso image for x86_64 (64 bit) burned it as an ISO image on a CD. Inserted the CD,started the system, cd booted and the i

  • Exception while Creating Confirmation Dialog Window

    Hi, Iam trying to create a confirmation Pop up window on the click of a "Save" button. I followed the procedure mentioned in the following link : http://wiki.sdn.sap.com/wiki/display/WDJava/CreatingConfirmationDialogBoxinWebDynproJava But when i clic