Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Keyboard Shortcuts not working




On Dec 18, 2007, at 7:37 AM, Patrick Flaherty wrote:

I'm having applet issue with Safari and Firefox using certain keyboard shortcuts.
It seems the browser is intercepting certain shortcuts while other make it to the applet.
For instance   command-a (select all) works in the applet even though both the applet
and browser have it defined. The applet being the focus I would expect this behavior.
But another shortcut that is defined in both the browser and the applet command-g,
never get to the applet but is instead executed by the browser.

For Swing components a command-key event will be delivered to the component, and if an action for that key exists, it will be executed. That's why Command-A does what you expect -- the Aqua L&F defines Cmd-A as select all for all components where it makes sense.

How are you defining the command-G shortcut for the applet? Can you post the code that does it? The answer and/or solution depends on who is listening for that shortcut. If you have added a JMenu and no component handled the command-g, it gets handled as a menu equivalent, but since there's no distinction between a Java menu and a non-Java menu, AppKit will trigger the first key equivalent it sees, which is in a Safari or Firefox menu.

Scott

------------------
Scott Kovatch
Apple Inc.
Java Runtime Classes
email@hidden

I am Scott Kovatch, and I approved this message.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

References: 
 >Keyboard Shortcuts not working (From: Patrick Flaherty <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.