HP-UX Reference (11i v2 04/09) - 3 Library Functions A-M (vol 6)

c
curses_intro(3X) curses_intro(3X)
(X/Open CURSES)
the cursor movement specified below does not persist in the visible cursor beyond the end of the opera-
tion. In functions that do move the cursor, these special characters can be used to affect the placement of
subsequent characters and to achieve movement of the visible cursor.
<backspace> Unless the cursor was already in column 0, <backspace> moves the cursor one
column toward the start of the current line and any characters after the <back-
space> are added or inserted starting there.
<carriage return>
Unless the cursor was already in column 0, <carriage return> moves the cursor
to the start of the current line. Any characters after the <carriage return> are
added or inserted starting there.
<newline> In an add operation, Curses adds the background character into successive
columns until reaching the end of the line. Scrolling occurs as described in
Truncation, Wrapping and Scrolling in curses_intro. Any characters after the
<newline> character are added at the start of the new line.
In an insert operation, <newline> moves the cursor to the start of a new line
(causing scrolling as described in Truncation, Wrapping and Scrolling in
curses_intro). Any characters after the <newline> character are placed at the
start of the new line.
The
filter() function may inhibit this processing.
<tab> Tab characters in text move subsequent characters to the next horizontal tab
stop. By default, tab stops are in column 0, 8, 16, and so on.
In an insert or add operation, Curses inserts or adds, respectively, the background character into
successive columns until reaching the next tab stop. If there are no more tab stops in the current
line, wrapping and scrolling occur as described in Truncation, Wrapping and Scrolling in
curses_intro.
Control Characters
The Curses functions that perform special-character processing conceptually convert control characters to
the caret (’ˆ’) character followed by a second character (which is an upper-case letter if it is alphabetic)
and write this string to the window in place of the control character. The functions that retrieve text
from the window will not retrieve the original control character.
Rendition of Characters Placed into a Window
When the application adds or inserts characters into a window, the effect is as follows:
If the character is not the space character, then the window receives:
the character that the application specifies
the colour that the application specifies; or the window colour, if the application does not
specify a colour
the attributes specified, OR-ed with the window attributes.
If the character is the space character, then the window receives:
the background character
the colour that the application specifies; or the background colour, if the application does not
specify a colour
the attributes specified, OR-ed with the background attributes.
Input Processing
The Curses input model provides a variety of ways to obtain input from the keyboard.
Keypad Processing
The application can enable or disable keypad translation by calling
keypad(). When translation is
enabled, Curses attempts to translate a sequence of terminal input that represents the pressing of a func-
tion key into a single key code. When translation is disabled, Curses passes terminal input to the appli-
cation without such translation, and any interpretation of the input as representing the pressing of a
keypad key must be done by the application.
HP-UX 11i Version 2: September 2004 9 Hewlett-Packard Company Section 3175