private static CollisionResults pick(Camera cam, Vector2f mouseLoc, Node node) {
        CollisionResults results = new CollisionResults();
        Ray ray = new Ray();
        Vector3f pos = new Vector3f(mouseLoc.x, mouseLoc.y, -1);
        Vector3f dir = new Vector3f(mouseLoc.x, mouseLoc.y, 1);
        dir.subtractLocal(pos).normalizeLocal();
        ray.setOrigin(pos);
        ray.setDirection(dir);
        node.collideWith(ray, results);
        return results;
    }
Easier to watch for all button and axis events with a raw input listener.
jme3-examples/src/main/java/jme3test/input/TestJoystick.java