@Override
    public void onAction(String name, boolean keyPressed, float tpf) {
        if (isEnabled()) {
            if (dragToRotate) {
                if (name.equals(CameraInput.CHASECAM_TOGGLEROTATE) && isEnabled()) {
                    if (keyPressed) {
                        canRotate = true;
                        if (hideCursorOnRotate) {
                            inputManager.setCursorVisible(false);
                        }
                    } else {
                        canRotate = false;
                        if (hideCursorOnRotate) {
                            inputManager.setCursorVisible(true);
                        }
                    }
                }
            }
        }

    }
Registers inputs with the input manager
jme3-core/src/main/java/com/jme3/app/ChaseCameraAppState.java