private void pickGamePad(Vector2f mouseLoc){
        if (lastButton != null) {
            CollisionResults results = pick(cam, mouseLoc, gamepad);
            for (CollisionResult cr : results) {
                Node n = cr.getGeometry().getParent();
                if (n != null && (n instanceof ButtonView)) {
                    String b = n.getName().substring("Button:".length());
                    String name = lastButton.getJoystick().getName().replaceAll(" ", "\\\\ ");
                    String id = lastButton.getLogicalId().replaceAll(" ", "\\\\ ");
                    System.out.println(name + "." + id + "=" + b);
                    return;
                }
            }
        }
    }
Easier to watch for all button and axis events with a raw input listener.
jme3-examples/src/main/java/jme3test/input/TestJoystick.java