From 69d750b6edd745b8773e2b110777195f524412fc Mon Sep 17 00:00:00 2001 From: Christian Burger Date: Thu, 7 Apr 2022 00:28:37 +0200 Subject: [PATCH] fixing return key MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When pressing return in `nano` the terminal received an `+J` instead of the return key. `+J` justifies the text. But is (confusingly) actually the key for a line feed as well? Terminal programming is not easy … --- NCursesPtyWindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NCursesPtyWindow.cpp b/NCursesPtyWindow.cpp index 6bb3b9d..510febe 100644 --- a/NCursesPtyWindow.cpp +++ b/NCursesPtyWindow.cpp @@ -39,7 +39,11 @@ namespace krikkel::NCursesPtyWindow vterm_screen_set_callbacks(pseudoTerminalScreen, &screenCallbacks, this); // the terminal is doing most of the work + //raw(); — cbreak might suffice + //noecho(); — already set + //nodelay(true); — @todo needs some reprogramming keypad(false); + nonl(); /// @todo block all signals, this thread does not handle any readPtyClientThread =