A library for handling FSM user input loops