File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Apple Command Key Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Apple Command Key " Watch "Apple Command Key " New topic
Author

Apple Command Key

Pres Brawner
Ranch Hand

Joined: Jan 18, 2001
Posts: 92
Does anybody know how to detect if this gets pushed. I've looked in KeyEvent, and it is not a KeyEvent that I know.
What I have written works well in WinOs with mnemonics, but I've received complaints. Control X is not what users expect to use when closing a Mac application. They want to use Open Apple X, (also known as "flower x" or Apple Command Key and X.
Thanks in advance.
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

i am a little as to what you are asking?
is it mnemonic or accelarator that you have a problem with?
mnemonic, as I understand, are driven by the meta key (Command
key in MacOS) and that too from an open menu.
could you please clarify.
- satya

Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Tony Gee
Greenhorn

Joined: Jun 22, 2001
Posts: 1
The Apple command ("flower") key should generated a KeyEvent.VK_META keycode. Also, to check whether or not a key combination has been pressed with the command key, check KeyEvent's getModifiers() for the KeyEvent.META_MASK.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Apple Command Key
 
Similar Threads
EnterKey to switch panels
getting key events in a frame
JFileChooser Multiple selection not working on Mac using apple, command key
Can java send command to keyboard???
JTextField and KeyEvents ...