issue#2 Support console input, handle control chars