update_io_button: store input() or output() in a variable