Debian Codegraph @

upstream/debian-trixie/man3/inopts.3ncurses

raw
1 '\" t
2 .\"***************************************************************************
3 .\" Copyright 2018-2024,2025 Thomas E. Dickey *
4 .\" Copyright 1998-2016,2017 Free Software Foundation, Inc. *
5 .\" *
6 .\" Permission is hereby granted, free of charge, to any person obtaining a *
7 .\" copy of this software and associated documentation files (the *
8 .\" "Software"), to deal in the Software without restriction, including *
9 .\" without limitation the rights to use, copy, modify, merge, publish, *
10 .\" distribute, distribute with modifications, sublicense, and/or sell *
11 .\" copies of the Software, and to permit persons to whom the Software is *
12 .\" furnished to do so, subject to the following conditions: *
13 .\" *
14 .\" The above copyright notice and this permission notice shall be included *
15 .\" in all copies or substantial portions of the Software. *
16 .\" *
17 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
18 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
19 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
20 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
21 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
22 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
23 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
24 .\" *
25 .\" Except as contained in this notice, the name(s) of the above copyright *
26 .\" holders shall not be used in advertising or otherwise to promote the *
27 .\" sale, use or other dealings in this Software without prior written *
28 .\" authorization. *
29 .\"***************************************************************************
30 .\"
31 .\" $Id: curs_inopts.3x,v 1.93 2025/02/02 00:02:25 tom Exp $
32 .TH inopts 3NCURSES 2025-02-01 "ncurses 6.5" "Library calls"
33 .ie \n(.g \{\
34 .ds `` \(lq
35 .ds '' \(rq
36 .\}
37 .el \{\
38 .ie t .ds `` ``
39 .el .ds `` ""
40 .ie t .ds '' ''
41 .el .ds '' ""
42 .\}
43 .
44 .de bP
45 .ie n .IP \(bu 4
46 .el .IP \(bu 2
47 ..
48 .SH NAME
49 \fB\%cbreak\fP,
50 \fB\%echo\fP,
51 \fB\%halfdelay\fP,
52 \fB\%intrflush\fP,
53 \fB\%is_cbreak\fP,
54 \fB\%is_echo\fP,
55 \fB\%is_nl\fP,
56 \fB\%is_raw\fP,
57 \fB\%keypad\fP,
58 \fB\%meta\fP,
59 \fB\%nl\fP,
60 \fB\%nocbreak\fP,
61 \fB\%nodelay\fP,
62 \fB\%noecho\fP,
63 \fB\%nonl\fP,
64 \fB\%noqiflush\fP,
65 \fB\%noraw\fP,
66 \fB\%notimeout\fP,
67 \fB\%qiflush\fP,
68 \fB\%raw\fP,
69 \fB\%timeout\fP,
70 \fB\%wtimeout\fP,
71 \fB\%typeahead\fP \-
72 get and set \fIcurses\fR terminal input options
73 .SH SYNOPSIS
74 .nf
75 \fB#include <curses.h>
76 .PP
77 \fBint cbreak(void);
78 \fBint nocbreak(void);
79 .PP
80 \fBint echo(void);
81 \fBint noecho(void);
82 .PP
83 \fBint intrflush(WINDOW * \fIwin\fP \fI/* ignored */\fP, bool \fIbf\fP);
84 \fBint keypad(WINDOW * \fIwin\fP, bool \fIbf\fP);
85 \fBint meta(WINDOW * \fIwin\fP \fI/* ignored */\fP, bool \fIbf\fP);
86 \fBint nodelay(WINDOW * \fIwin\fP, bool \fIbf\fP);
87 \fBint notimeout(WINDOW * \fIwin\fP, bool \fIbf\fP);
88 .PP
89 \fBint nl(void);
90 \fBint nonl(void);
91 .PP
92 \fBvoid qiflush(void);
93 \fBvoid noqiflush(void);
94 .PP
95 \fBint raw(void);
96 \fBint noraw(void);
97 .PP
98 \fBint halfdelay(int \fItenths\fP);
99 \fBvoid timeout(int \fIdelay\fP);
100 \fBvoid wtimeout(WINDOW * \fIwin\fP, int \fIdelay\fP);
101 .PP
102 \fBint typeahead(int \fIfd\fP);
103 .PP
104 \fI/* extensions */
105 \fBint is_cbreak(void);
106 \fBint is_echo(void);
107 \fBint is_nl(void);
108 \fBint is_raw(void);
109 .fi
110 .SH DESCRIPTION
111 .I curses
112 offers configurable parameters permitting an application to control the
113 handling of input from the terminal.
114 Some,
115 such as those affecting the terminal's
116 .I mode
117 or line discipline,
118 are global,
119 applying to all windows;
120 others apply only to a specific window.
121 The library does not automatically apply such parameters to new or
122 derived windows;
123 an application must configure each window for the desired behavior.
124 .PP
125 Some descriptions below make reference to an
126 .IR "input character reading function" ":"
127 this is \fB\%wgetch\fP(3NCURSES) in the non-wide character
128 .I curses
129 API and \fB\%wget_wch\fP(3NCURSES) in the wide character API.
130 In addition to the variant forms of these described in
131 \fB\%ncurses\fP(3NCURSES),
132 the
133 .I curses
134 functions \fB\%wgetstr\fP(3NCURSES) and \fB\%wget_wstr\fP(3NCURSES) and their own
135 variants call the appropriate input character reading function.
136 .\"
137 .SS "cbreak, nocbreak"
138 Normally,
139 the terminal driver buffers typed characters,
140 not delivering them to an application
141 until a line feed or carriage return is typed.
142 This canonical (\*(``cooked\*('') line discipline also supports
143 software flow control,
144 simple line editing functions
145 (character and word erase,
146 and whole-line erasure or \*(``kill\*(''),
147 and job control.
148 .B \%cbreak
149 configures the terminal in
150 .IR "cbreak mode" ","
151 which disables line buffering
152 and erase and kill character processing \(em
153 the interrupt,
154 quit,
155 suspend,
156 and flow control characters are unaffected \(em
157 and makes characters typed by the user immediately available to the
158 program.
159 .B \%nocbreak
160 restores canonical (\*(``cooked\*('') mode.
161 .PP
162 The state of the terminal is unknown to a
163 .I curses
164 application when it starts;
165 therefore,
166 a program should call
167 .B \%cbreak
168 or
169 .B \%nocbreak
170 explicitly.
171 Most interactive programs using
172 .I curses
173 set \%cbreak
174 mode.
175 Calling
176 .B \%cbreak
177 overrides
178 .BR raw "."
179 The man page for the input character reading function
180 discusses how
181 .B \%cbreak
182 and
183 .B \%nocbreak
184 interact with
185 .B echo
186 and
187 .BR \%noecho "."
188 .\"
189 .SS "echo, noecho"
190 .B echo
191 and
192 .B \%noecho
193 determine whether characters typed by the user are written to the
194 .I curses
195 window by the input character reading function as they are typed.
196 .I curses
197 always disables the terminal driver's own echoing.
198 By default,
199 a
200 .I curses
201 screen's echo option is set.
202 Authors of most interactive programs prefer
203 to do their own echoing in a controlled area of the screen,
204 or not to echo at all,
205 so they call
206 .BR \%noecho "."
207 The man page for the input character reading function
208 discusses how
209 .B echo
210 and
211 .B \%noecho
212 interact with
213 .B \%cbreak
214 and
215 .BR \%nocbreak "."
216 .\"
217 .SS halfdelay
218 .B \%halfdelay
219 configures
220 .IR "half-delay mode" ","
221 which is similar to \%cbreak mode in that characters typed by the user
222 are immediately available to the program.
223 However,
224 after blocking for
225 .I tenths
226 tenth-seconds,
227 an input character reading function returns
228 .B ERR
229 if no input is pending.
230 The value of
231 .I tenths
232 must be between 1 and 255.
233 Use
234 .B \%nocbreak
235 to leave half-delay mode.
236 .\"
237 .SS intrflush
238 .B \%intrflush
239 calls
240 .B \%qiflush
241 (see below)
242 if
243 .I bf
244 is
245 .BR TRUE ","
246 and
247 .B \%noqiflush
248 if
249 .I bf
250 is
251 .BR FALSE "."
252 It ignores its
253 .I win
254 argument.
255 .\"
256 .SS keypad
257 .B keypad
258 enables recognition of a terminal's function keys.
259 If
260 enabled
261 .RI ( bf
262 is
263 .BR TRUE ),
264 the input character reading function returns a value representing
265 the function key,
266 such as
267 .BR KEY_LEFT "."
268 (Wide-character API users:
269 \fB\%wget_wch\fP(3NCURSES) returns
270 .B \%KEY_CODE_YES
271 to indicate the availability of a function key code in its
272 .I wch
273 parameter.)
274 If disabled
275 .RI ( bf
276 is
277 .BR FALSE ),
278 .I curses
279 does not treat function keys specially and the program has to interpret
280 escape sequences itself.
281 If the terminal's keypad can be turned on
282 (made to transmit)
283 and off
284 (made to work locally),
285 .B \%keypad
286 configures it consistently with the
287 .I bf
288 parameter.
289 By default,
290 a window's keypad mode is off.
291 .\"
292 .SS meta
293 Initially,
294 whether the terminal returns 7- or 8-bit character codes on input
295 depends on the configuration of the terminal driver;
296 on POSIX systems,
297 see \fI\%termios\fP(3).
298 To force 8 bits to be returned,
299 call
300 .BR meta( .\|.\|. ,
301 .BR TRUE) ;
302 this is equivalent,
303 on POSIX systems,
304 to setting the CS8 flag on the terminal.
305 To force 7 bits to be returned,
306 call
307 .BR meta( .\|.\|. ,
308 .BR FALSE) ;
309 this is equivalent,
310 on POSIX systems,
311 to setting the CS7 flag on the terminal.
312 .I curses
313 ignores the window argument
314 .IR win "."
315 If the
316 .I \%term\%info
317 string capabilities
318 .B \%meta_on
319 .RB ( smm )
320 and
321 .B \%meta_off
322 .RB ( rmm )
323 are defined for the terminal type,
324 enabling meta mode sends
325 .B smm
326 to the terminal and disabling it sends
327 .B rmm
328 to the terminal.
329 .\"
330 .SS "nl, nonl"
331 Initially,
332 whether the terminal reports a carriage return
333 using the character code for a line feed
334 in cbreak or raw modes
335 depends on the configuration of the terminal driver;
336 see \fI\%termios\fP(3).
337 .B nl
338 configures the terminal to perform this translation.
339 .B nonl
340 disables it.
341 Under its canonical (\*(``cooked\*('') line discipline,
342 the terminal driver always translates carriage returns to line feeds.
343 .\"
344 .SS nodelay
345 .B \%nodelay
346 configures the input character reading function to be non-blocking for
347 window
348 .IR "win" .
349 If no input is ready,
350 the reading function returns
351 .BR ERR "."
352 If disabled
353 .RI ( bf
354 is
355 .BR FALSE ),
356 the reading function does not return until it has input.
357 .SS notimeout
358 When the input character reading function reads an ESC character,
359 it sets a timer while waiting for the next character.
360 .BI \%notimeout( win ,
361 .B TRUE)
362 disables this timer.
363 The purpose of the timeout is to distinguish sequences produced by a
364 function key from those typed by a user.
365 To configure the timeout rather than disabling it,
366 see
367 .B \%wtimeout
368 below.
369 .\"
370 .SS "qiflush, noqiflush"
371 .\"
372 .B \%qiflush
373 and
374 .B \%noqiflush
375 configure the terminal driver's treatment of its input and output queues
376 when it handles the interrupt,
377 suspend,
378 or quit characters under the canonical (\*(``cooked\*('')
379 or cbreak line disciplines on POSIX systems;
380 see \fI\%termios\fP(3).
381 The default behavior is inherited from the terminal driver settings.
382 Calling
383 .B \%qiflush
384 configures the terminal to
385 .I flush
386 the queues
387 (discarding their contents)
388 when any of these events occurs,
389 giving the impression of faster response to user input,
390 but making the library's model of the screen contents incorrect.
391 Calling
392 .B \%noqiflush
393 prevents such flushing,
394 but might frustrate impatient users on slow connections if a
395 .I curses
396 update of the screen is in progress when the event occurs;
397 see
398 .B \%typeahead
399 below for a mitigation of this problem.
400 You may want to call
401 .B \%noqiflush
402 in a signal handler if,
403 after the handler exits,
404 you want output to continue
405 as though the interrupt had not occurred.
406 .\"
407 .SS "raw, noraw"
408 .B raw
409 configures the terminal to read input in
410 .IR "raw mode" ,
411 which is similar to cbreak mode
412 (see
413 .B \%cbreak
414 above)
415 except that it furthermore passes through the terminal's configured
416 interrupt,
417 quit,
418 suspend,
419 and flow control characters
420 uninterpreted to the application,
421 instead of generating a signal or acting on I/O flow.
422 The behavior of the terminal's \*(``Break\*('' key
423 (if any)
424 depends on terminal driver configuration parameters that
425 .I curses
426 does not handle.
427 .B \%noraw
428 restores the terminal's canonical (\*(``cooked\*('') line discipline.
429 .\"
430 .SS "timeout, wtimeout"
431 .B \%wtimeout
432 configures whether a
433 .I curses
434 input character reading function called on window
435 .I win
436 uses blocking or non-blocking reads.
437 If
438 .I delay
439 is negative,
440 .I curses
441 uses a blocking read,
442 waiting indefinitely for input.
443 If
444 .I delay
445 is zero,
446 the read is non-blocking;
447 an input character reading function returns
448 .B ERR
449 if no input is pending.
450 If
451 .I delay
452 is positive,
453 an input character reading function
454 blocks for
455 .I delay
456 milliseconds,
457 and returns
458 .B ERR
459 if the delay elapses and there is still no input pending.
460 .B \%timeout
461 calls
462 .B \%wtimeout
463 on
464 .BR stdscr "."
465 .\"
466 .SS typeahead
467 Normally,
468 a
469 .I curses
470 library checks the terminal for input while updating the screen.
471 If any is found,
472 the update is postponed until the next \fB\%wrefresh\fP(3NCURSES) or
473 \fB\%doupdate\fP(3NCURSES) call,
474 allowing faster response to user key strokes.
475 The library tests the file descriptor corresponding to the
476 .I FILE
477 stream pointer passed to \fB\%newterm\fP(3NCURSES)
478 (or
479 .I stdin
480 if \fB\%initscr\fP(3NCURSES) was called),
481 for pending input.
482 .B \%typeahead
483 instructs
484 .I curses
485 to test file descriptor
486 .I fd
487 instead.
488 An
489 .I fd
490 of
491 .B \-1
492 disables the check.
493 .\"
494 .SH RETURN VALUE
495 .B \%timeout
496 and
497 .B \%wtimeout
498 return no value.
499 .PP
500 .BR \%cbreak ","
501 .BR \%nocbreak ","
502 .BR \%echo ","
503 .BR \%noecho ","
504 .BR \%halfdelay ","
505 .BR \%intrflush ","
506 .BR \%keypad ","
507 .BR \%meta ","
508 .BR \%nodelay ","
509 .BR \%notimeout ","
510 .BR \%nl ","
511 .BR \%nonl ","
512 .BR \%raw ","
513 .BR \%noraw ","
514 and
515 .B \%typeahead
516 return
517 .B OK
518 on success and
519 .B ERR
520 on failure.
521 .PP
522 In
523 .IR \%ncurses ","
524 the functions in the previous paragraph return
525 .B ERR
526 if
527 .bP
528 the library's
529 .I \%TERMINAL
530 structure for the device has not been initialized with
531 \fB\%initscr\fP(3NCURSES),
532 \fB\%newterm\fP(3NCURSES),
533 or
534 \fB\%setupterm\fP(3NCURSES),
535 or
536 .bP
537 .I win
538 is a null pointer
539 (except with
540 .B \%intrflush
541 and
542 .BR meta ","
543 which ignore its value).
544 .PP
545 Further,
546 .B \%halfdelay
547 returns
548 .B ERR
549 if
550 .I delay
551 is outside the range 1..255.
552 .PP
553 See section \*(``EXTENSIONS\*('' below for the
554 return values of
555 .BR is_cbreak ","
556 .BR is_echo ","
557 .BR is_nl ","
558 and
559 .BR is_raw "."
560 .SH NOTES
561 .BR echo ","
562 .BR \%noecho ","
563 .BR \%halfdelay ","
564 .BR \%intrflush ","
565 .BR meta ","
566 .BR nl ","
567 .BR nonl ","
568 .BR \%nodelay ","
569 .BR \%notimeout ","
570 .BR \%noqiflush ","
571 .BR \%qiflush ","
572 .BR \%timeout ","
573 and
574 .B \%wtimeout
575 may be implemented as macros.
576 .PP
577 .B \%noraw
578 and
579 .B \%nocbreak
580 follow historical practice in that they attempt to restore
581 the terminal's canonical (\*(``cooked\*('') line discipline
582 from raw and cbreak,
583 respectively.
584 Mixing
585 .BR \%raw / noraw
586 calls with
587 .BR \%cbreak / nocbreak
588 calls leads to terminal driver control states that are hard to predict
589 or understand;
590 doing so is not recommended.
591 .SH EXTENSIONS
592 .I \%ncurses
593 provides four \*(``is_\*('' functions corresponding to
594 .BR \%cbreak ","
595 .BR echo ","
596 .BR nl ","
597 and
598 .BR raw ","
599 permitting their states to be queried by the application.
600 .PP
601 .TS
602 center;
603 Lb Lb Lb
604 L L L .
605 Query Set Reset
606 _
607 is_cbreak cbreak nocbreak
608 is_echo echo noecho
609 is_nl nl nonl
610 is_raw raw noraw
611 .TE
612 .PP
613 In each case,
614 the function returns
615 .TP 5 \" "-1" + 2n tag separation + 1n fudge for typesetters like grops
616 .B 1
617 if the option is set,
618 .TP
619 .B 0
620 if the option is unset,
621 or
622 .TP
623 .B \-1
624 if the library's
625 .I \%TERMINAL
626 structure for the device has not been initialized.
627 .SH PORTABILITY
628 Applications employing
629 .I \%ncurses
630 extensions should condition their use on the visibility of the
631 .B \%NCURSES_VERSION
632 preprocessor macro.
633 .PP
634 Except as noted in section \*(``EXTENSIONS\*('' above,
635 X/Open Curses Issue\ 4 describes these functions.
636 It specifies no error conditions for them.
637 .PP
638 SVr4 describes a successful return value only as
639 \*(``an integer value other than
640 .IR ERR \*(''. \" Courier roman in source; SVID 4, vol. 3, p. 508
641 .\" It continues "unless otherwise noted in the preceding routine
642 .\" descriptions", but no notes otherwise are present; the man page
643 .\" discusses getch()'s return value repeatedly, but never those of the
644 .\" functions the page ostensibly documents.
645 .PP
646 .I \%ncurses
647 follows X/Open Curses
648 and the historical practice of System\ V
649 .IR curses ","
650 clearing the terminal driver's \*(``echo\*('' flag when initializing the
651 screen.
652 BSD
653 .I curses
654 did not,
655 but its
656 .I raw
657 function turned it off as a side effect.
658 .\" SGTTY's sg_flags had a "RAW" symbol; termio in SVr1 for the PDP-11
659 .\" did not.
660 .\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=4BSD/usr/include/curses.h
661 .\" https://github.com/ryanwoodsmall/oldsysv/blob/master/sysv-pdp11_man/a_man/man7/termio.7
662 For best portability,
663 call
664 .B echo
665 or
666 .B \%noecho
667 explicitly just after initialization,
668 even if your program retains the terminal's canonical (\*(``cooked\*('')
669 line discipline.
670 .PP
671 X/Open Curses is ambiguous regarding whether
672 .I raw
673 should disable the carriage return and line feed translation feature
674 controlled by
675 .I nl
676 and
677 .IR \%nonl "."
678 BSD
679 .I curses
680 did turn off these translations;
681 System\ V
682 .I curses
683 did not.
684 .I \%ncurses
685 does so,
686 on the assumption that a programmer requesting raw input wants a clean
687 (ideally,
688 8-bit clean)
689 connection that the operating system will not alter.
690 .PP
691 When
692 .B \%keypad
693 is first enabled,
694 .I \%ncurses
695 loads the key definitions for the current terminal description.
696 If the terminal description includes extended string capabilities,
697 for example,
698 by using the
699 .B \-x
700 option of \fB\%tic\fP(1),
701 then
702 .I \%ncurses
703 also defines keys for the capabilities whose names begin with
704 \*(``k\*(''.
705 Corresponding key codes are generated and
706 (depending on previous loads of terminal descriptions)
707 may differ from one execution of a program to the next.
708 The generated key codes are recognized by \fB\%keyname\fP(3NCURSES),
709 which then returns a name beginning with \*(``k\*('' denoting the
710 .I \%term\%info
711 capability name rather than \*(``K\*('',
712 used for
713 .I curses
714 key names.
715 On the other hand,
716 an application can use \fB\%define_key\fP(3NCURSES) to bind
717 a specific key to a string of the programmer's choice.
718 This feature enables an application to check for its presence
719 with \fB\%tigetstr\fP(3NCURSES),
720 and reassign the key code to match its own needs.
721 .PP
722 Low-level applications can use \fB\%tigetstr\fP(3NCURSES) to obtain the
723 definition of any string capability.
724 .I curses
725 applications use the input character reading function
726 to obtain key codes from input
727 and rely upon the order in which the string capabilities are loaded.
728 Multiple key capability strings can have the same value,
729 but the input character reading function can report only one key code.
730 Most
731 .I curses
732 implementations
733 (including
734 .IR \%ncurses )
735 load key definitions in the order
736 they appear in the
737 .B \%strfnames
738 array of string capability names;
739 see \fB\%terminfo_variables\fP(3NCURSES).
740 .\" ncurses/tinfo/parse_entry.c:lookup_fullname, I think --GBR
741 The last capability read using a particular definition determines the
742 key code to be reported.
743 In
744 .IR \%ncurses ,
745 extended capabilities can be interpreted as key definitions.
746 These are loaded after the predefined keys,
747 and if a capability's value is the same as a previously loaded
748 key definition,
749 the library uses the later definition.
750 .SH HISTORY
751 4BSD (1980)
752 introduced
753 .IR echo ","
754 .IR \%noecho ","
755 .IR nl ","
756 .IR \%nonl ","
757 .IR raw ","
758 and
759 .IR \%noraw "." \" also crmod and nocrmod, never standardized
760 .PP
761 SVr2 (1984)
762 featured a new terminal driver,
763 extending the
764 .I curses
765 API to support it with
766 .IR \%cbreak ","
767 .IR \%nocbreak ","
768 .IR \%intrflush ","
769 .IR \%keypad ","
770 .IR \%meta ","
771 .IR \%nodelay ","
772 and
773 .IR \%typeahead "."
774 .PP
775 SVr3 (1987)
776 added
777 .IR \%halfdelay ","
778 .IR \%notimeout ","
779 and
780 .IR \%wtimeout "."
781 .I \%qiflush
782 and
783 .I \%noqiflush
784 appeared in SVr3.1 (1987),
785 at which point
786 .I \%intrflush
787 became a wrapper for either of these functions,
788 depending on the value of its Boolean argument.
789 SVr3.1 also added
790 .IR \%timeout "."
791 .PP
792 .I \%ncurses
793 6.5 (2024) introduced
794 .IR is_cbreak ","
795 .IR is_echo ","
796 .IR is_nl ","
797 and
798 .IR is_raw "."
799 .PP
800 Formerly,
801 .I \%ncurses
802 used
803 .I \%nl
804 and
805 .I \%nonl
806 to control the conversion of newlines to carriage return/line feed
807 on output as well as input.
808 X/Open Curses documents the use of these functions only for input.
809 This difference arose from converting the
810 .I \%pcurses
811 source (1986),
812 which used
813 \fI\%ioctl\fP(2) calls and the
814 .I \%sgttyb
815 structure,
816 to
817 .I \%termios
818 (the POSIX terminal API).
819 In the former,
820 both input and output were controlled via a single option
821 \*(``CRMOD\*('',
822 while the latter separates these features.
823 Because that conversion interferes with output optimization,
824 .I \%ncurses
825 6.2 (2020) amended
826 .I \%nl
827 and
828 .I \%nonl
829 to eliminate their effect on output.
830 .SH SEE ALSO
831 \fB\%ncurses\fP(3NCURSES),
832 \fB\%getch\fP(3NCURSES),
833 \fB\%initscr\fP(3NCURSES),
834 \fB\%util\fP(3NCURSES),
835 \fB\%define_key\fP(3NCURSES),
836 \fB\%termios\fP(3),
837 \fB\%terminfo_variables\fP(3NCURSES)