I'd like to prompt the user for input, let the user enter multiple lines of text, hitting enter between each line, then terminate the input by pressing CTRL+D or some such thing.
With "keypress", I can catch the EOF, but I would have to handle all the echoing, backspace handling, terminal escape sequences, etc. manually. It would be much better if I could use "readline", but somehow intercept the CTRL+D (EOF) with "keypress", but I'm not sure how I would go about that.