Added inputSurrogate code to CaptureBox and stateDrawProblem.