public void addListener(InputListener listener, String... mappingNames) {
        for (String mappingName : mappingNames) {
            Mapping mapping = mappings.get(mappingName);
            if (mapping == null) {
                mapping = new Mapping(mappingName);
                mappings.put(mappingName, mapping);
            }
            if (!mapping.listeners.contains(listener)) {
                mapping.listeners.add(listener);
            }
        }
    }
Adds a new listener to receive events on the given mappings.

<p>The given InputListener will be registered to receive events
on the specified mapping names. When a mapping raises an event, the
listener will have its appropriate method invoked, either
{@link ActionListener#onAction(java.lang.String, boolean, float) }
or {@link AnalogListener#onAnalog(java.lang.String, float, float) }
depending on which interface the <code>listener</code> implements.
If the listener implements both interfaces, then it will receive the
appropriate event for each method.

@param listener The listener to register to receive input events.
@param mappingNames The mapping names which the listener will receive
events from.

@see InputManager#removeListener(com.jme3.input.controls.InputListener)
jme3-core/src/main/java/com/jme3/input/InputManager.java