Disabling Apple key in a JTable

I have a JTable on Windows i can use CNTL-C,CNTl-V to copy and paste between cells.
I then migrated it to OSX where the default is to use AppleCommand-C and AppleCommand-V instead. The problem is that it doesnt work because unlike pressing CNTL pressing AppleCommand on its own starts editing the cell so popupmenu command doesnt run.
For another reason on windows i had sucessfully disabled use of the F2 key to edit cells so tried a similar method to diisable the command key as follows.
table.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), 0), "none");
        table.getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke(Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), 0), "none");
        table.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), 0), "none");to disable the command key but it has no effect.
Any ideas , please ?

FYI I posted this on the Apple Java Mailing list and two slightly different but essentially the same solutions were provided. I went with the one implemeneted in Quaqua.
Start of thread here http://lists.apple.com/archives/java-dev/2004/Dec/msg00279.html

Similar Messages

  • Disable left Apple key

    Hi,
    Is there a trick to disable the left Apple key? Is there something like xmodmap for applications outside X11?
    Thanks.

    Sorry, I don't know the answer to this — except ripping the cap off the key and sticking a wad of chewing gum on in its place!
    But I am curious as to WHY you'd want to do this. The convenience of having two Cmd keys is great—for example, Cmd-Q is best typed with the right Cmd key, whereas Cmd-P is easier to get with the left.
    Cheers!
    Archie

  • How do I pair an apple key board to a brand new mac mini?

    How do I pair an apple key board to a brand new mac mini?

    Have you tried a wired keyboard to turn on the BT system?  Macs can require some special key-combinations that *must* be seen before the OS starts and BT sometimes does not activate before the OS.

  • My apple ID was disabled so i had to make a new apple ID, But the disabled apple ID  had all my games on it. Is there any way we could enable my disabled account

    My apple ID was disabled so i had to make a new apple ID, But the disabled apple ID had all my games on it. Is there any way we could enable my disabled account?????????????????????????

    If not this:
    Why do I see the message "This Apple ID has been disabled for security reasons” when I enter my password?
    This message means that someone was unable to sign in to this account multiple times. The Apple ID system will disable the account to prevent unauthorized people from gaining access to your information. You'll need to follow the instructions on My Apple ID to reset your password.
    Otherwise, contact iTunes:
    Apple - Support - iTunes - Contact Us

  • How to disable a particular cell in JTable ?

    I having a problem on how to set disable a particular cell in JTable. At the first place to load the JTable, I want to set some of the cell to disabled, it only will run at the first time, is there anyway to do it ?

    This is the function that disable/enable cells in JTables.
    Are you looking for this?
    public boolean isCellEditable(int row, int col)
      if(((new Integer((String)(getValueAt(row,0)).toString()).intValue()>9))&&(col==1))
        return true;
      if(row!=4&&col!=5)
        return true;
      return false;
         this metod belong to the TableModel function
    and what I gave you is only an example of what you can do with it.
    if it return false it disable and if true it enable the cell...but I think this you allready know!
    Regards Amnon

  • How can I disable a key through software?

    A friend of mine spilt water on her keyboard. As a result, her forward slash key frequently spams and makes typing difficult. I used a program to remap the forward slash key to a forward delete key, but that has also caused problems. What I'm looking for is a program that will allow me to completely disable a key.
    I should note, I've used KeyRemap4Macbook and I've also developed my own code, which disables the key on Cocoa applications. However, the key still spams on applications like Microsoft Word.
    Her Macbook is more than a year old, and she can't afford to buy a new one.
    Any suggestions?

    Liquid in a physical keyboard is great trouble. You may worsen state if you continue to use it like this, make the effort to change it. It is not cheap, but may prove cheaper than damage the whole computer.

  • Key not typing letter, but working with Apple key in combination with lette

    I have an Indigo iBook. Just today the "f" key has stopped working - at least for tying the letter itself. When I press it in combination with the Apple key however, I get the "find" box to come up, so in some way the key is working on the keyboard. We have removed the cap and directly pressed the plastic underneath; no difference. Slso hooked up an external keyboard - still no f!!!!!
    After searching the forums, we have found that many people have had luck removing their keyboard and checking the ribbon cable or the airport spring - do not want to do something so drastic if there is an easier fix.
    Thanks very much!
    iBook Indigo   Mac OS X (10.0.x)  

    Just an update if anyone has any more ideas - (troy enn - thanks, but nothing was assigned in my Universal Access to the f key).
    The f letter works in upper case, just not lower case. So, for now, I am just using the character palette, and inserting an f if I need it - thankfully, for some reason I don't seem to use it all that much!

  • Apple key not working

    I have a microsoft wireless keyboard, and suddenly, my apple key is not working. All of the other keys on the keyboard work, so I am assuming that there is not a problem with the keyboard. I have tried resetting my keyboard shortcuts to default through system preferences, but no luck. Any suggestions? Thanks.

    Welcome to Discussions - have you tried using some compressed air to clean the keyboard, it might simply be something lodged under the key. You might also try removing and re-pairing the keyboard.

  • Disabled apple id

    My newphew set my mom up with an ipad and apple/itunes id
    I too set my Mom up with an Itunes/apple ID for her Ipad.
    I try to login with the information I set up and I get "APPLE ID IS DISABLED".  I've reset the password to the ID I set up 4 times and I still get the error message about my Apple ID being disabled.  I'm not sure if the 2 id's are conflicting or what.  I basically want to DELETE his apple ID and use the one I set up for Mom.  I want to download apps, music, etc. for Mom but can't because of the ID issue.  (She has an Ipad 1)  Somebody help before I go crazy.  Thanks.

    Hello there, Ruthimorin.
    Sounds like you have your hands fool. The following Knowledge Base articles should offer some guidance for your issue.
    In regards to the disabled Apple ID:
    Apple ID: 'This Apple ID has been disabled for security reasons' alert appears
    http://support.apple.com/kb/TS2446
    Once that issue is resolved use this information to login using your desired Apple ID:
    iOS: Changing the signed-in iTunes Store Apple ID account
    http://support.apple.com/kb/ht1311
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • How to listen to key press in JTable

    I've been trying to listen to key press in JTable,
    However it only works if the cell is double-clicked.
    If the tab button is use or the cell is single-clicked, nothing happens to the listener.
    Anybody can help me???
    Thanks

    table.getColumnModel().addColumnModelListener(new TableColumnModelListener(){
      public void columnAdded(TableColumnModelEvent e){}
      public void columnMarginChanged(ChangeEvent e){}
      public void columnMoved(TableColumnModelEvent e){}
      public void columnRemoved(TableColumnModelEvent e){}
      public void columnSelectionChanged(ListSelectionEvent e){
        // column selection changed
    table.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
      public void valueChanged(ListSelectionEvent event) {
        // row selection changed
    });rykk

  • Need help in reassigning 'fn' key to be a command [apple] key

    Hi everyone,
    I have a Japanese keyboard-ed Powerbook 12". I would like to reassign the fn key to function as a command/apple key, primarily for web browsing. I tried adding a keyboard shortcut just for Safari but it wouldn't work and I am ont sure what I am doing wrong.
    The Japanese keyboards only have one command/apple key (on the left side), and it would be nice to have one on the right side instead (close to the arrow keys).
    FYI, the keyboard layout on the right side is currently:
    [kana-switch to JP key] [fn] [enter] [arrow keys]
    Thanks for any help!!

    Hi Nate --
    I'm not certain (in fact, the more I look at it I kind of doubt it), but maybe DoubleCommand might help you do what you want, or at least something approximating that.
    I'll keep looking, but it's the best I can come up with right now.
    -- JDee

  • My I Mac does not start properly without pressing option and apple keys ,and it freezes

    My I Mac does not start properly without pressing option and apple keys ,and it freezes

    Try any of the following:
    http://support.apple.com/kb/HT1379 Resetting your Mac's PRAM and NVRAM  
    Disconnect all devices from the computer then do the following:
    Boot up from your Snow Leopard Install DVD while holding down the "c" key.
    Select the language you wish to use, and then choose "Disk Utility" from the menu bar.
    Your HD should appear in a panel on the left hand side of the window which opens. Select it and then click on the "repair disk" button in the right hand section of the window.
    Once this process has been completed restart your computer and repair permissions directly from Disk Utility.
    If Disk Utility is unable to complete the repair, you will need to use a stronger 3rd party utility like DiskWarrior, Techtool PRO (not Deluxe) or Drive Genius.
    Troubleshoot the spinning beach ball/freezing & crashing 

  • HT5636 I was typing in a word for Mac document and I hit the apple key and the numeral 8 at the same time now all of my documents have these strange symbols please help

    I was typing in a word for Mac document and I hit the apple key and the numeral 8 at the same time now all of my documents have these strange symbols please help

    Simply type command 8 again. That toggles the "show paragraphs" function.

  • Disable Function Key F3 in Internet Explorer

    I would like to disable function keys F1 and F3 while playing
    my flash movie in internet explorer. I am using these keys within
    Flash to do some actions.
    I got the script working for Function Key F1 using the
    following script
    <script language="javascript">
    document.onhelp = function() {return(false);}
    window.onhelp = function() {return(false);}
    </script>
    But unable to make it to work for function key F3.
    Thanks in advance,
    Desmond

    Hi des_shun, I have workaround for this issue.
    First thing we have to do is disable keyboard event for F3 key on HTML document so that even if focus is on html document, default Search functionality will not popup. Next thing is, flash must contain KeyboardEvent listener for keyboard response. This is where we will keep our custom F3 functionality. This setting works well on Chrome & FireFox.
    Now IE thing.
    The prolem with IE is that if any one of F3, F5, F6,F7 & F11 key is pressed, when the focus is on flash movie it directly executes the default browser functions like searching, refreshing etc never allowing flash to execute its keyeventlistener. But if focus is on document body, then F3 and other keys work fine.
    Here is the catch.
    All we have to do is whenever focus is shifted to flash, we should revert that focus to document body.
    Here is how we can do this.
    Capture the MouseClick event in your flash movie. Then in this mouseclick event handler, call  javascript function to change focus to document again. Below is the sample code.
    //Flash Code
    stage.addEventListener(MouseEvent.CLICK,mClick);
    function mClick(event:MouseEvent)
              ExternalInterface.call("changeFocus");
    // Javascript Code
    <script type="text/javascript"</script>
              function changeFocus()
                             document.body.focus();
        </script>
    Thats it!

  • 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");

Maybe you are looking for

  • HP LP2475w produces small calibrated gamut

    Summary of the issue When calibrated, the resulting ICC profile for this monitor spans a gamut that is smaller than anticipated. Monitor and settings LP2475w with panel LPL LM240WU4 F/W: GIG068 S-L0226 Backlight hours: 4760 Brightness: 21 Contrast: 8

  • Finder periodically using waaayyyyy too much memory

    Since upgrading to 10.5.8 the Finder strikes me as being a bit odd at times. Sometimes it is using a lot of cpu cycles such as 50-80% for no apparent reason that I can find – not copying anything, etc. In trying to sus this out when I notice my machi

  • Bank not display in help list

    Hi Guru, I have been created  sixteen bank (A...........P) in FI module and which are displaying in HCM through info type 9 BANK DETAIL. My question is how I block bank (L & K) in the list of bank key of info type 9 in HCM module. The bank L & K Will

  • Reg UserAssaigned() method in RoleListener API

    Hi,This method is  in the interface RoleListener 1) I want to know when the following method is called. This is in the interface RoleListener 2)When do we may find its usage? 3)Do we need to register for  the Roles that are to be observed when a user

  • Service PR from production order operation!

    Hi All, I just want to check whether it is possible to trigger service purchase requisitions (with item category D) for an external vendor from a production order operation? If it is, please let me know the procedure to do so... Regards. V S