javascript terminal/console style input widget