public static void addMappings(Properties p) {
        final String AXIS_LABEL = "axis";
        final String BUTTON_LABEL = "button";

        float[] range;
        int lBracketIndex, rBracketIndex, commaIndex;

        for (Map.Entry<Object, Object> e : p.entrySet()) {
            range = null;
            String key = String.valueOf(e.getKey()).trim();

            int firstSplit = key.indexOf('.');
            int split = key.lastIndexOf('.');
            if (split < 0) {
                logger.log(Level.WARNING, "Skipping mapping:{0}", e);
                continue;
            }

            String type;
            if (firstSplit >= 0 && firstSplit != split) {
                type = key.substring(0, firstSplit).trim();
                if (!type.equals(AXIS_LABEL) && !type.equals(BUTTON_LABEL)) {
                    /*
                     * In this case, the "type" is probably a part of the
                     * joystick name.
                     */
                    firstSplit = -1;
                    type = "";
                }
            } else {
                firstSplit = -1;
                type = "";
            }
            String stick = key.substring(firstSplit + 1, split).trim();
            String component = key.substring(split + 1).trim();
            String value = String.valueOf(e.getValue()).trim();
            if ("regex".equals(component)) {
                // It's a name remapping
                addJoystickNameRegex(value, stick);
            }
            if ((lBracketIndex = value.indexOf('[')) > 0) {
                /*
                 * This means that there is an axis range.
                 */
                range = new float[2];
                rBracketIndex = value.indexOf(']');
                commaIndex = value.indexOf(',');
                if (rBracketIndex > -1 && commaIndex > -1) {
                    try {
                        range[0] = Float.parseFloat(value.substring(lBracketIndex + 1, commaIndex).trim());
                        range[1] = Float.parseFloat(value.substring(commaIndex + 1, rBracketIndex).trim());
                        value = value.substring(0, lBracketIndex).trim();
                        type = AXIS_LABEL;
                    } catch (NumberFormatException nfe) {
                        logger.log(Level.SEVERE, "Could not parse axis range \"" + value.substring(lBracketIndex) + "\"", nfe);
                    }
                }
            }
            switch (type) {
                case AXIS_LABEL:
                    if (range == null) {
                        addAxisMapping(stick, component, value);
                    } else {
                        addAxisMapping(stick, component, value, range);
                    }
                    break;
                case BUTTON_LABEL:
                    addButtonMapping(stick, component, value);
                    break;
                default:
                    addMapping(stick, component, value);
            }
        }
    }
Adds a preconfigured set of mappings in Properties object
form where the names are dot notation
"axis"/"button"/"". "joystick"."axis/button name"
and the values are the remapped component name.  This calls
addMapping(stickName, sourceComponent, remap) for every property
that it is able to parse.

@param p (not null)
jme3-core/src/main/java/com/jme3/input/JoystickCompatibilityMappings.java