@Override
    public void assignButton(String mappingName) {
        inputManager.addMapping(mappingName, new JoyButtonTrigger(parent.getJoyId(), buttonIndex));
    }
Assign the mapping name to receive events from the given button index
on the joystick.

@param mappingName The mapping to receive joystick button events.
jme3-core/src/main/java/com/jme3/input/DefaultJoystickButton.java