Implementing state machine input API.