Refresh the display. Normally the library takes care of refreshing. Nonetheless, some
other program might output to the terminal and mess the display. In that case the user
might want to force a refresh.

Set up the state object for using vty. At most one state object should be
created at a time. The delay, in microseconds, specifies the period of time to wait for a key
following reading ESC from the terminal before considering the ESC key press as a discrete event.