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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply 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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Apple Command Key
 
Similar Threads
JTextField and KeyEvents ...
Can java send command to keyboard???
EnterKey to switch panels
JFileChooser Multiple selection not working on Mac using apple, command key
getting key events in a frame