Function createTouchInputStateMachine