On Thursday 01 December 2022 09:34:41 am Michael wrote:
On Thursday 01 December 2022 01:42:29 am Dr. Nikolaus
Klepp wrote:
Anno domini 2022 Thu, 1 Dec 11:01:39 +0900
"Shift+enter" does not work as the key combination that should be sent to
the application window. The comment of the "Hello"-example says that
"Enter" or "Return" generate '"enter" (i.e. new
line)', but in my case
"enter" did not send a newline while "return" did.
It’s from back in the day when typewriters were a thing. You had ‘carriage
return’ and ‘line feed.’ Both of which were combined into the
typewriter's slide-lever you used to get back to the beginning of a line
and move down one line. Early computers only used one character (to save
disk space), but Windows copied it verbatim so now:
EOL is generally "\r\n" on Windows and "\n" on anything else.
Which is confusing as all get out, as the lay terms "return" equates to
"\n". And, as we’re not on Windows the lay term “enter” ("\r") isn’t
used
for us.
That came from memory, ymmv....
Short answer? Microsoft fucks up another thing...
Bah!, I think I flipped the terms above.
CR, carriage return, \r
LF, line feed, (new line?), \n
The lay terms "Enter" and "Return" come from usage on keyboards.
AFAIR "Enter" is Windows, "Return" was pre-windows.
Best,
Michael