[Solved] How to get jME3 to unlock mouse and keyboard?

When I run the following code:

public class Simulator extends SimpleApplication {
    private Node avatar;

    // Constructor, getter & setter, etc.

    public static void main(String[] args) {
        Simulator simulator = new Simulator();

        simulator.setShowSettings(false);
        AppSettings settings = new AppSettings(true);
        settings.put("Width", 1280);
        settings.put("Height", 720);
        settings.put("Title", "My awesome Game");
        settings.put("VSync", true)
        settings.put("Samples", 4);
        simulator.setSettings(settings);

        simulator.start();
    }

    @Override
    void simpleInitApp() {
        viewPort.setBackgroundColor(ColorRGBA.LightGray);
        DirectionalLight directionalLight = new DirectionalLight();
        rootNode.addLight(directionalLight);

        avatar = (Node)assetManager.loadModel("models/Ninja.mesh.xml");
        avatar.setLocalScale(0.5f);
        rootNode.attachChild(avatar);
    }
}

The jME3 game that starts up has focus seems to lock my keyboard and mouse. Meaning, I can’t move my mouse off the “game window” and access other open apps/windows. Ditto for keyboard. How do I tell jME3 to stop blocking the input controls?

flycam.setDragToRotate(true);
If I’m not mistaken.
That will, instead of capturing the mouse, alliw you to drag the mouse to look around.

Awesome, thanks @grizeldi that worked! Also, how do I get rid of the annoying “stats box” in the lower-right hand corner (contains FPS, other metrics, etc.)?

Press F5 while ingame.
If you want it in code you’ll have to do some magic on app settings:
settings.setShowFps(false);
settings.setShowStats(false);

Again not sure this is correct.

StatsAppState statsState = stateManager.getState(StatsAppState.class)

and then:

statsState.setDisplayFps(false)
statsState.setDisplayStatView(false)
or
statsState.setEnabled(false)

Thanks both @grizeldi and @Ogli