Changeset 4929 in josm for trunk/src/org


Ignore:
Timestamp:
2012-02-14T12:58:05+01:00 (8 years ago)
Author:
Don-vip
Message:

see #7386 - Do not list unknown keyCodes when using a non-English locale

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/PrefJPanel.java

    r4916 r4929  
    66import java.awt.GridBagLayout;
    77import java.awt.Insets;
     8import java.awt.Toolkit;
     9
    810import static org.openstreetmap.josm.tools.I18n.tr;
    911
     
    103105    private static Map<Integer, String> setKeyList() {
    104106        Map<Integer, String> list = new LinkedHashMap<Integer, String>();
     107        String unknown = Toolkit.getProperty("AWT.unknown", "Unknown");
    105108        // I hate this, but I found no alternative...
    106109        for (int i = 0; i < 65534; i++) {
    107110            String s = KeyEvent.getKeyText(i);
    108             if (s != null && s.length() > 0 && !s.contains("Unknown")) {
     111            if (s != null && s.length() > 0 && !s.contains(unknown)) {
    109112                list.put(Integer.valueOf(i), s);
    110113                //System.out.println(i+": "+s);
Note: See TracChangeset for help on using the changeset viewer.