private int convertButton(final int glfwButton) {
        switch (glfwButton) {
            case GLFW_MOUSE_BUTTON_LEFT:
                return MouseInput.BUTTON_LEFT;
            case GLFW_MOUSE_BUTTON_MIDDLE:
                return MouseInput.BUTTON_MIDDLE;
            case GLFW_MOUSE_BUTTON_RIGHT:
                return MouseInput.BUTTON_RIGHT;
            default:
                return glfwButton;
        }
    }
Simply converts the GLFW button code to a JME button code. If there is no
match it just returns the GLFW button code. Bear in mind GLFW supports 8
different mouse buttons.

@param glfwButton the raw GLFW button index.
@return the mapped {@link MouseInput} button id.
jme3-lwjgl3/src/main/java/com/jme3/input/lwjgl/GlfwMouseInput.java