Ticket #1589: ShortCutLabel3.diff
File ShortCutLabel3.diff, 1.2 KB (added by , 16 years ago) |
---|
-
src/org/openstreetmap/josm/tools/ShortCutLabel.java
5 5 6 6 import java.awt.event.KeyEvent; 7 7 8 import org.openstreetmap.josm.Main; 8 9 9 10 public class ShortCutLabel { 10 11 public static String name(int shortCut, int modifiers) { … … 19 20 s += tr("AltGr-"); 20 21 if ((modifiers & KeyEvent.SHIFT_MASK) != 0 || (modifiers & KeyEvent.SHIFT_DOWN_MASK) != 0) 21 22 s += tr("Shift-"); 23 if ((modifiers & KeyEvent.META_MASK) != 0 || (modifiers & KeyEvent.META_DOWN_MASK) != 0) 24 if (Main.withOSXIntegration) { 25 s += "\u2318-"; 26 } else { 27 s += tr("Meta-"); 28 } 22 29 if (shortCut >= KeyEvent.VK_F1 && shortCut <= KeyEvent.VK_F12) 23 30 s += "F"+(shortCut-KeyEvent.VK_F1+1); 31 else if (shortCut == KeyEvent.VK_DELETE) 32 if (Main.withOSXIntegration) { 33 s += "\u2326"; 34 } else { 35 s += tr("Del"); 36 } 37 else if (shortCut == KeyEvent.VK_PLUS) 38 s += "+"; // KeyEvent.VK_PLUS fails to render to a "+" on some platforms 24 39 else 25 40 s += Character.toUpperCase((char)shortCut); 26 41 return s;