public static void readMappings(InputMap im) {
    Preferences bindings = PREFS.node("bindings"); //$NON-NLS-1$
    try {
      boolean changed = false;
      for (String key : bindings.keys()) {
        String act = bindings.get(key, null);
        if (act != null) {
          changed = true;
          im.put(JoshText.key(key), act);
        }
      }
      if (changed) {
        return;
      }
    } catch (BackingStoreException e) {
      System.err.println("Failed to read JoshEdit keybindings!"); //$NON-NLS-1$
    }

    for (String key : DEFAULTS.keySet()) {
      String act = DEFAULTS.getString(key);
      im.put(JoshText.key(key), act);
    }
  }