This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
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 Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Apple Command Key " Watch "Apple Command Key " New topic

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
Tony Gee

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:
subject: Apple Command Key
It's not a secret anymore!