bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 08/17] man/curs_getch.3x: Correct description.


From: G. Branden Robinson
Subject: [PATCH 08/17] man/curs_getch.3x: Correct description.
Date: Wed, 13 Mar 2024 13:10:46 -0500

* What the "left arrow" and "backspace" mean in context has to be
  explained.  Also, they are only recognized in keypad mode (unless one
  is the same as the terminal's erase character).
* This function doesn't directly cause any beeping.  I could not
  reproduce the documented behavior nor does its implementation in
  ncurses/base/lib_getch.c ever call "beep".
* nl() only makes a carriage return also perform a line feed if cbreak()
  has also been called.
---
 man/curs_getch.3x | 33 +++++++++++++++++++++++----------
 1 file changed, 23 insertions(+), 10 deletions(-)

diff --git a/man/curs_getch.3x b/man/curs_getch.3x
index fed7fa703..cc189523f 100644
--- a/man/curs_getch.3x
+++ b/man/curs_getch.3x
@@ -85,18 +85,31 @@ .SS "Reading Characters"
 then the character will also be echoed into the
 designated window according to the following rules:
 .bP
-If the character is the current erase character, left arrow, or backspace,
-the cursor is moved one space to the left and that screen position is erased
-as if \fBdelch\fP had been called.
-.bP
-If the character value is any other \fBKEY_\fP define, the user is alerted
-with a \fBbeep\fP call.
+If
+the character value
+matches the terminal's erase character,
+the cursor moves leftward one position
+and the new position is erased
+as if \fB\%wmove\fP(3X) and then \fB\%wdelch\fP(3X) were called.
+When the window's keypad mode is enabled
+(see below),
+.B \%KEY_LEFT
+and
+.B \%KEY_BACKSPACE
+are handled the same way.
 .bP
-If the character is a carriage-return,
-and if \fBnl\fP is enabled,
-it is translated to a line-feed after echoing.
+.I curses
+writes any other
+character value
+to the window,
+as with \fB\%wechochar\fP(3X).
 .bP
-Otherwise the character is simply output to the screen.
+If
+the character value
+is a carriage return,
+and if \fBcbreak\fP(3X) and \fBnl\fP(3X) have both been called,
+.I curses
+also performs a line feed.
 .PP
 If the window is not a pad, and it has been moved or modified since the last
 call to \fBwrefresh\fP, \fBwrefresh\fP will be called before another character
-- 
2.30.2

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]