Q: how to display menu accelerators

Leonid Romanov leonid.romanov at oracle.com
Mon Apr 2 02:23:06 PDT 2012


Thanks!

----- Исходное сообщение -----
От: swingler at apple.com
Кому: leonid.romanov at oracle.com
Копия: macosx-port-dev at openjdk.java.net
Отправленные: Четверг, 29 Март 2012 г 19:05:43 GMT +04:00 Абу-Даби, Маскат
Тема: Re: Q: how to display menu accelerators

On Mar 29, 2012, at 6:50 AM, Leonid Romanov wrote:

> Hi,
> Currently we display  menu accelerators (that is, keyboard modifiers one needs to press in order to invoke menu command via keystroke) as "Control", "Alt" and "Meta" text strings. This is obviously not right. However, I'm not sure what is the correct solution here: Apple has these funky symbols that stand for Control, Option and Command, yet they seem to be absent on the most modern Apple keyboards. For example, on my MBP keyboard only Command key has a corresponding symbol above "Command" string. So, what should JDK display: symbols, or just plain "Control", "Option" and "Command"?

My suggestion would be to remain coherent with the Java SE 6 and the rest of OS X by using the symbols.

This is an excerpt from an awt.properties file which contains the OS X-specific menu glyphs:

# Modifier names
AWT.shift=\u21e7
AWT.control=\u2303
AWT.alt=\u2325
AWT.meta=\u2318
AWT.altGraph=\u2325

# Key names
AWT.enter=\u23ce
AWT.backSpace=\u232b
AWT.tab=\u21e5
AWT.cancel=\u238b
AWT.clear=\u2327
AWT.pause=Pause
AWT.capsLock=\u21ea
AWT.escape=\u238b
AWT.space=\u2423
AWT.pgup=\u21de
AWT.pgdn=\u21df
AWT.end=\u2198
AWT.home=\u2196
AWT.left=\u2190
AWT.up=\u2191
AWT.right=\u2192
AWT.down=\u2193
AWT.begin=Begin
AWT.comma=,
AWT.period=.
AWT.slash=/
AWT.semicolon=;
AWT.equals=\u003d
AWT.openBracket=[
AWT.backSlash=\\
AWT.closeBracket=]
AWT.multiply=\u2328 *
AWT.add=\u2328 +
AWT.separator=\u2328 ,
AWT.separater=\u2328 ,
AWT.subtract=\u2328 -
AWT.decimal=\u2328 .
AWT.divide=\u2328 /
AWT.delete=\u2326
AWT.numLock=Num Lock
AWT.scrollLock=Scroll Lock
AWT.f1=F1
AWT.f2=F2
AWT.f3=F3
AWT.f4=F4
AWT.f5=F5
AWT.f6=F6
AWT.f7=F7
AWT.f8=F8
AWT.f9=F9
AWT.f10=F10
AWT.f11=F11
AWT.f12=F12
AWT.f13=F13
AWT.f14=F14
AWT.f15=F15
AWT.f16=F16
AWT.f17=F17
AWT.f18=F18
AWT.f19=F19
AWT.f20=F20
AWT.f21=F21
AWT.f22=F22
AWT.f23=F23
AWT.f24=F24
AWT.printScreen=\u2399
AWT.insert=Insert
AWT.help=Help
AWT.windows=Windows
AWT.context=Context Menu
AWT.backQuote=`
AWT.quote='
AWT.deadGrave=Dead Grave
AWT.deadAcute=Dead Acute
AWT.deadCircumflex=Dead Circumflex
AWT.deadTilde=Dead Tilde
AWT.deadMacron=Dead Macron
AWT.deadBreve=Dead Breve
AWT.deadAboveDot=Dead Above Dot
AWT.deadDiaeresis=Dead Diaeresis
AWT.deadAboveRing=Dead Above Ring
AWT.deadDoubleAcute=Dead Double Acute
AWT.deadCaron=Dead Caron
AWT.deadCedilla=Dead Cedilla
AWT.deadOgonek=Dead Ogonek
AWT.deadIota=Dead Iota
AWT.deadVoicedSound=Dead Voiced Sound
AWT.deadSemivoicedSound=Dead Semivoiced Sound
AWT.ampersand=&
AWT.asterisk=*
AWT.quoteDbl="
AWT.Less=<
AWT.greater=>
AWT.braceLeft=[
AWT.braceRight=]
AWT.at=@
AWT.colon=:
AWT.circumflex=^
AWT.dollar=$
AWT.euro=\u20ac
AWT.exclamationMark=!
AWT.invertedExclamationMark=\u00a1
AWT.leftParenthesis=(
AWT.numberSign=#
AWT.plus=+
AWT.minus=-
AWT.rightParenthesis=)
AWT.underscore=_
AWT.final=Final
AWT.convert=Convert
AWT.noconvert=No Convert
AWT.accept=Accept
AWT.modechange=Mode Change
AWT.kana=Kana
AWT.kanji=Kanji
AWT.alphanumeric=Alphanumeric
AWT.katakana=Katakana
AWT.hiragana=Hiragana
AWT.fullWidth=Full-Width
AWT.halfWidth=Half-Width
AWT.romanCharacters=Roman Characters
AWT.allCandidates=All Candidates
AWT.previousCandidate=Previous Candidate
AWT.codeInput=Code Input
AWT.japaneseKatakana=Japanese Katakana
AWT.japaneseHiragana=Japanese Hiragana
AWT.japaneseRoman=Japanese Roman
AWT.kanaLock=Kana Lock
AWT.inputMethodOnOff=Input Method On/Off
AWT.again=Again
AWT.undo=Undo
AWT.copy=Copy
AWT.paste=Paste
AWT.cut=Cut
AWT.find=Find
AWT.props=Props
AWT.stop=Stop
AWT.compose=Compose

# Numeric Keypad
AWT.numpad=\u2328
AWT.unknown=Unknown
AWT.undefined=Undefined

Regards,
Mike Swingler
Apple Inc.



More information about the macosx-port-dev mailing list