Apple changed the implementation of KeyEvent.getKeyText() to
return the unicode for the key glyph instead of a textual
description.
return menuSymbols;
}
+ public static String getKeyText(MenuKeySymbol sym) {
+ if (VncViewer.os.startsWith("mac os x"))
+ return sym.name.replace("_", " ");
+ else
+ return KeyEvent.getKeyText(sym.keycode);
+ }
+
public static String getMenuKeyValueStr() {
String s = "";
for (int i = 0; i < getMenuKeySymbolCount(); i++) {
JLabel menuKeyLabel = new JLabel("Menu Key");
String[] menuKeys = new String[MenuKey.getMenuKeySymbolCount()];
for (int i = 0; i < MenuKey.getMenuKeySymbolCount(); i++)
- menuKeys[i] = KeyEvent.getKeyText(MenuKey.getMenuKeySymbols()[i].keycode);
+ menuKeys[i] = MenuKey.getKeyText(MenuKey.getMenuKeySymbols()[i]);
menuKey = new JComboBox(menuKeys);
inputPanel.add(viewOnly,