Finally sort out what the hell is going on with input from the terminal