@Override
    public void onAction(String name, boolean isPressed, float tpf) {
        switch(name) {
            case INPUT_MAPPING_FORWARD:
                keyForward = isPressed;
                break;
            case INPUT_MAPPING_BACKWARD:
                keyBackward = isPressed;
                break;
            case INPUT_MAPPING_LEFT:
                keyLeft = isPressed;
                break;
            case INPUT_MAPPING_RIGHT:
                keyRight = isPressed;
                break;
            case INPUT_MAPPING_RESET:
                enqueue(new Callable<Void>() {
                    @Override
                    public Void call() {
                        reset();
                        return null;
                    }
                });
                break;
        }
    }
Physics based marble game.

@author SkidRunner (Mark E. Picknell)
jme3-examples/src/main/java/jme3test/games/RollingTheMonkey.java