How do I tell screen not to send each character but entire lines?
You don't. You fix your sketch so that it simply reads and stores the data until the end-of-line marker arrives.
Yes, but maybe not in all cases...
I use a kind of menu over serial line.
A simplified context would be https://github.com/reppr/softboard
This type of sketch gains essential functionality by assuming the terminal sends line by line as the arduino GUI serial monitor does. Let me explain:
The serial menu works on a couple of one letter commands and numbers. In the case of softboard (a type of software breadboard used to run tests on hardware while building a project) ´a´ shows numeric and bar graph representation of all analog input readings. ´P13´ selects pin 13, ´O´ configures it as output, ´H´ switches it on, and similar. So ´P13OH´ would switch the led on and tell the user it did, ´L´ switches it off again.
´P9OW123 P0v´ runs the heater on pin 9 with pwm value 123 and lets you continuously watch temperature readings from the sensor at A0.
To be useful to beginners the menu tries to be self explanatory. So if the user omits the pin number and sends a bare ´P´ it would inform the user that she must enter a number for the pin to select.
I do use the same approach for much more complex things than softboard, like generating polyphonic pulses on piezzos to produce rhythms, notes and chords (lower audio spectrum only).
I would *not* want my sketch to stop playing while making up my mind what keys to press next before entering a line. And then RAM (for buffering) is precious too. So I do have my reasons not wanting to change the fundamental design of these sketches
Works well an the arduino GUI serial monitor, but I prefer text console wherever possible and would like to run it on a headless raspberry pi where arduino gui is sloooow. Screen would be
handy (I use it on the raspi anyway) if i knew how to configure it to send line by line as the arduino gui does.