Fixed resetInput code.
Added code for checking virtual button presses.