Debian Codegraph @

upstream/mageia-cauldron/man3/curs_inopts.3x

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.107 2025/07/05 12:55:10 tom Exp $
32 .TH curs_inopts 3X 2025-07-05 "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(3X) in the non-wide character
128 .I curses
129 API and \fB\%wget_wch\fP(3X) in the wide character API.
130 In addition to the variant forms of these described in
131 \fB\%ncurses\fP(3X),
132 the
133 .I curses
134 functions \fB\%wgetstr\fP(3X) and \fB\%wget_wstr\fP(3X) 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 then when an input character reading function reads ESC,
265 it waits for further input corresponding to an escape sequence
266 defined by the terminal type description.
267 If a valid sequence populates the input stream,
268 the input character reading function
269 returns a value representing the function key,
270 such as
271 .BR KEY_LEFT "."
272 (Wide-character API users:
273 \fB\%wget_wch\fP(3X) returns
274 .B \%KEY_CODE_YES
275 to indicate the availability of a function key code in its
276 .I wch
277 parameter.)
278 If the sequence is invalid,
279 the input character reading function returns only its last character.
280 If disabled
281 .RI ( bf
282 is
283 .BR FALSE ),
284 .I curses
285 does not treat function keys specially and the program has to interpret
286 escape sequences itself.
287 If the terminal's keypad can be turned on
288 (made to transmit)
289 and off
290 (made to work locally),
291 .B \%keypad
292 configures it consistently with the
293 .I bf
294 parameter.
295 By default,
296 a window's keypad mode is off.
297 .\"
298 .SS meta
299 Initially,
300 whether the terminal returns 7- or 8-bit character codes on input
301 depends on the configuration of the terminal driver;
302 on POSIX systems,
303 see \fI\%termios\fP(3).
304 To force 8 bits to be returned,
305 call
306 .BR meta( .\|.\|. ,
307 .BR TRUE) ;
308 this is equivalent,
309 on POSIX systems,
310 to setting the CS8 flag on the terminal.
311 To force 7 bits to be returned,
312 call
313 .BR meta( .\|.\|. ,
314 .BR FALSE) ;
315 this is equivalent,
316 on POSIX systems,
317 to setting the CS7 flag on the terminal.
318 .I curses
319 ignores the window argument
320 .IR win "."
321 If the
322 .I \%term\%info
323 string capabilities
324 .B \%meta_on
325 .RB ( smm )
326 and
327 .B \%meta_off
328 .RB ( rmm )
329 are defined for the terminal type,
330 enabling meta mode sends
331 .B smm
332 to the terminal and disabling it sends
333 .B rmm
334 to the terminal.
335 .\"
336 .SS "nl, nonl"
337 Initially,
338 whether the terminal reports a carriage return
339 using the character code for a line feed
340 in cbreak or raw modes
341 depends on the configuration of the terminal driver;
342 see \fI\%termios\fP(3).
343 .B nl
344 configures the terminal to perform this translation.
345 .B nonl
346 disables it.
347 Under its canonical (\*(``cooked\*('') line discipline,
348 the terminal driver always translates carriage returns to line feeds.
349 .\"
350 .SS nodelay
351 .B \%nodelay
352 configures the input character reading function to be non-blocking for
353 window
354 .IR "win" .
355 If no input is ready,
356 the reading function returns
357 .BR ERR "."
358 If disabled
359 .RI ( bf
360 is
361 .BR FALSE ),
362 the reading function does not return until it has input.
363 .SS notimeout
364 When the input character reading function reads an ESC character,
365 it sets a timer while waiting for the next character.
366 .BI \%notimeout( win ,
367 .B TRUE)
368 disables this timer.
369 The purpose of the timeout is to distinguish sequences produced by a
370 function key from those typed by a user.
371 If this timer is disabled,
372 .I curses
373 waits forever for subsequent keystrokes
374 until it determines the escape sequence to be valid or invalid.
375 .\"
376 .SS "qiflush, noqiflush"
377 .\"
378 .B \%qiflush
379 and
380 .B \%noqiflush
381 configure the terminal driver's treatment of its input and output queues
382 when it handles the interrupt,
383 suspend,
384 or quit characters under the canonical (\*(``cooked\*('')
385 or cbreak line disciplines on POSIX systems;
386 see \fI\%termios\fP(3).
387 The default behavior is inherited from the terminal driver settings.
388 Calling
389 .B \%qiflush
390 configures the terminal to
391 .I flush
392 the queues
393 (discarding their contents)
394 when any of these events occurs,
395 giving the impression of faster response to user input,
396 but making the library's model of the screen contents incorrect.
397 Calling
398 .B \%noqiflush
399 prevents such flushing,
400 but might frustrate impatient users on slow connections if a
401 .I curses
402 update of the screen is in progress when the event occurs;
403 see
404 .B \%typeahead
405 below for a mitigation of this problem.
406 You may want to call
407 .B \%noqiflush
408 in a signal handler if,
409 after the handler exits,
410 you want output to continue
411 as though the signal had not occurred.
412 .\"
413 .SS "raw, noraw"
414 .B raw
415 configures the terminal to read input in
416 .IR "raw mode" ,
417 which is similar to cbreak mode
418 (see
419 .B \%cbreak
420 above)
421 except that it furthermore passes through the terminal's configured
422 interrupt,
423 quit,
424 suspend,
425 and flow control characters
426 uninterpreted to the application,
427 instead of generating a signal or acting on I/O flow.
428 The behavior of the terminal's \*(``Break\*('' key
429 (if any)
430 depends on terminal driver configuration parameters that
431 .I curses
432 does not handle.
433 .B \%noraw
434 restores the terminal's canonical (\*(``cooked\*('') line discipline.
435 .\"
436 .SS "timeout, wtimeout"
437 .B \%wtimeout
438 configures whether a
439 .I curses
440 input character reading function called on window
441 .I win
442 uses blocking or non-blocking reads.
443 If
444 .I delay
445 is negative,
446 .I curses
447 uses a blocking read,
448 waiting indefinitely for input.
449 If
450 .I delay
451 is zero,
452 the read is non-blocking;
453 an input character reading function returns
454 .B ERR
455 if no input is pending.
456 If
457 .I delay
458 is positive,
459 an input character reading function
460 blocks for
461 .I delay
462 milliseconds,
463 and returns
464 .B ERR
465 if the delay elapses and there is still no input pending.
466 .B \%timeout
467 calls
468 .B \%wtimeout
469 on
470 .BR stdscr "."
471 .\"
472 .SS typeahead
473 Normally,
474 a
475 .I curses
476 library checks the terminal's input file descriptor for activity
477 with \fIpoll\fP(2) or \fI\%select\fP(2)
478 while updating the screen;
479 if it finds any,
480 it postpones output
481 until the next \fB\%wrefresh\fP(3X) or \fB\%doupdate\fP(3X) call,
482 allowing faster response to user key strokes.
483 The library tests the file descriptor corresponding to the
484 .I FILE
485 stream pointer passed to \fB\%newterm\fP(3X)
486 (or
487 .I stdin
488 if \fB\%initscr\fP(3X) was called),
489 for pending input.
490 .B \%typeahead
491 instructs
492 .I curses
493 to test file descriptor
494 .I fd
495 instead.
496 An
497 .I fd
498 of
499 .B \-1
500 disables the check.
501 .\"
502 .SH RETURN VALUE
503 .B \%timeout
504 and
505 .B \%wtimeout
506 return no value.
507 .PP
508 .BR \%cbreak ","
509 .BR \%nocbreak ","
510 .BR \%echo ","
511 .BR \%noecho ","
512 .BR \%halfdelay ","
513 .BR \%intrflush ","
514 .BR \%keypad ","
515 .BR \%meta ","
516 .BR \%nodelay ","
517 .BR \%notimeout ","
518 .BR \%nl ","
519 .BR \%nonl ","
520 .BR \%raw ","
521 .BR \%noraw ","
522 and
523 .B \%typeahead
524 return
525 .B OK
526 on success and
527 .B ERR
528 on failure.
529 .PP
530 In
531 .IR \%ncurses ","
532 the functions in the previous paragraph return
533 .B ERR
534 if
535 .bP
536 the library's
537 .I \%TERMINAL
538 structure for the device has not been initialized with
539 \fB\%initscr\fP(3X),
540 \fB\%newterm\fP(3X),
541 or
542 \fB\%setupterm\fP(3X),
543 or
544 .bP
545 .I win
546 is a null pointer
547 (except with
548 .B \%intrflush
549 and
550 .BR meta ","
551 which ignore its value).
552 .PP
553 Further,
554 .B \%halfdelay
555 returns
556 .B ERR
557 if
558 .I delay
559 is outside the range 1..255.
560 .PP
561 See section \*(``EXTENSIONS\*('' below for the
562 return values of
563 .BR is_cbreak ","
564 .BR is_echo ","
565 .BR is_nl ","
566 and
567 .BR is_raw "."
568 .SH NOTES
569 .BR echo ","
570 .BR \%noecho ","
571 .BR \%halfdelay ","
572 .BR \%intrflush ","
573 .BR meta ","
574 .BR nl ","
575 .BR nonl ","
576 .BR \%nodelay ","
577 .BR \%notimeout ","
578 .BR \%noqiflush ","
579 .BR \%qiflush ","
580 .BR \%timeout ","
581 and
582 .B \%wtimeout
583 may be implemented as macros.
584 .PP
585 .B \%noraw
586 and
587 .B \%nocbreak
588 follow historical practice in that they attempt to restore
589 the terminal's canonical (\*(``cooked\*('') line discipline
590 from raw and cbreak,
591 respectively.
592 Mixing
593 .BR \%raw / noraw
594 calls with
595 .BR \%cbreak / nocbreak
596 calls leads to terminal driver control states that are hard to predict
597 or understand;
598 doing so is not recommended.
599 .PP
600 .I curses
601 documentation uses the terms \*(``delay\*('' and \*(``timeout\*(''
602 freely to describe two related but distinct aspects of input handling,
603 at the risk of confusing the user.
604 The functions
605 .BR \%halfdelay ","
606 .BR \%nodelay ","
607 .BR \%timeout ","
608 and
609 .B \%wtimeout
610 configure whether the input character reading function
611 \%(\fBwgetch\fP(3X) or \fB\%wget_wch\fP(3X))
612 waits for keyboard input to begin,
613 and for how long.
614 .B \%keypad
615 configures whether that function waits for further input
616 if the first character it reads is ESC.
617 Calling
618 .BR \%notimeout ","
619 which has nothing to do with
620 .B \%timeout
621 or
622 .BR \%wtimeout ","
623 makes this delay in expectation of further characters
624 effectively infinite.
625 X/Open Curses affords no means of otherwise configuring
626 the length of this second delay,
627 but an AIX and
628 .I \%ncurses
629 extension,
630 .BR \%ESCDELAY ,
631 is available both as an environment variable and a global symbol
632 permitting the user and application,
633 respectively,
634 to do so;
635 see \fB\%ncurses\fP(3X) and \fBcurs_variables\fP(3X).
636 .SH EXTENSIONS
637 .I \%ncurses
638 provides four \*(``is_\*('' functions corresponding to
639 .BR \%cbreak ","
640 .BR echo ","
641 .BR nl ","
642 and
643 .BR raw ","
644 permitting their states to be queried by the application.
645 .PP
646 .TS
647 center;
648 Lb Lb Lb
649 L L L .
650 Query Set Reset
651 _
652 is_cbreak cbreak nocbreak
653 is_echo echo noecho
654 is_nl nl nonl
655 is_raw raw noraw
656 .TE
657 .PP
658 In each case,
659 the function returns
660 .TP 5 \" "-1" + 2n tag separation + 1n fudge for typesetters like grops
661 .B 1
662 if the option is set,
663 .TP
664 .B 0
665 if the option is unset,
666 or
667 .TP
668 .B \-1
669 if the library's
670 .I \%TERMINAL
671 structure for the device has not been initialized.
672 .SH PORTABILITY
673 Applications employing
674 .I \%ncurses
675 extensions should condition their use on the visibility of the
676 .B \%NCURSES_VERSION
677 preprocessor macro.
678 .PP
679 Except as noted in section \*(``EXTENSIONS\*('' above,
680 X/Open Curses Issue\ 4 describes these functions.
681 It specifies no error conditions for them.
682 .PP
683 SVr4 describes a successful return value only as
684 \*(``an integer value other than
685 .IR ERR \*(''. \" Courier roman in source; SVID 4, vol. 3, p. 508
686 .\" It continues "unless otherwise noted in the preceding routine
687 .\" descriptions", but no notes otherwise are present; the man page
688 .\" discusses getch()'s return value repeatedly, but never those of the
689 .\" functions the page ostensibly documents.
690 .PP
691 .I \%ncurses
692 follows X/Open Curses
693 and the historical practice of System\ V
694 .IR curses ","
695 clearing the terminal driver's \*(``echo\*('' flag when initializing the
696 screen.
697 BSD
698 .I curses
699 did not,
700 but its
701 .I raw
702 function turned it off as a side effect.
703 .\" SGTTY's sg_flags had a "RAW" symbol; termio in SVr1 for the PDP-11
704 .\" did not.
705 .\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=4BSD/usr/include/curses.h
706 .\" https://github.com/ryanwoodsmall/oldsysv/blob/master/sysv-pdp11_man/a_man/man7/termio.7
707 For best portability,
708 call
709 .I echo
710 or
711 .I \%noecho
712 explicitly just after initialization,
713 even if your program retains the terminal's canonical (\*(``cooked\*('')
714 line discipline.
715 .PP
716 X/Open Curses is ambiguous regarding whether
717 .I raw
718 should disable the carriage return and line feed translation feature
719 controlled by
720 .I nl
721 and
722 .IR \%nonl "."
723 BSD
724 .I curses
725 turned off these translations;
726 System\ V
727 .I curses
728 did not.
729 .I \%ncurses
730 does so,
731 on the assumption that a programmer requesting raw input wants a clean
732 (ideally,
733 8-bit clean)
734 connection that the operating system will not alter.
735 .PP
736 When
737 .B \%keypad
738 is first enabled,
739 .I \%ncurses
740 loads the key definitions for the current terminal type description.
741 If that description includes extended string capabilities,
742 for example,
743 by using the
744 .B \-x
745 option of \fB\%tic\fP(1),
746 then
747 .I \%ncurses
748 also defines keys for the capabilities whose names begin with
749 \*(``k\*(''.
750 Corresponding key codes are generated and
751 (depending on previous loads of terminal descriptions)
752 may differ from one execution of a program to the next.
753 The generated key codes are recognized by \fB\%keyname\fP(3X),
754 which then returns a name beginning with \*(``k\*('' denoting the
755 .I \%term\%info
756 capability name rather than \*(``K\*('',
757 used for
758 .I curses
759 key names.
760 On the other hand,
761 an application can use \fB\%define_key\fP(3X) to bind
762 a specific key to a string of the programmer's choice.
763 This feature enables an application to check for its presence
764 with \fB\%tigetstr\fP(3X),
765 and reassign the key code to match its own needs.
766 .PP
767 Low-level applications can use \fB\%tigetstr\fP(3X) to obtain the
768 definition of any string capability.
769 .I curses
770 applications use the input character reading function
771 to obtain key codes from input
772 and rely upon the order in which the string capabilities are loaded.
773 Multiple key capability strings can have the same value,
774 but the input character reading function can report only one key code.
775 Most
776 .I curses
777 implementations
778 (including
779 .IR \%ncurses )
780 load key definitions in the order
781 they appear in the
782 .B \%strfnames
783 array of string capability names;
784 see \fB\%term_variables\fP(3X).
785 .\" ncurses/tinfo/parse_entry.c:lookup_fullname, I think --GBR
786 The last capability read using a particular definition determines the
787 key code to be reported.
788 In
789 .IR \%ncurses ,
790 extended capabilities can be interpreted as key definitions.
791 These are loaded after the predefined keys,
792 and if a capability's value is the same as a previously loaded
793 key definition,
794 the library uses the later definition.
795 .SH HISTORY
796 4BSD (1980)
797 introduced
798 .IR echo ","
799 .IR \%noecho ","
800 .IR nl ","
801 .IR \%nonl ","
802 .IR raw ","
803 and
804 .IR \%noraw "." \" also crmod and nocrmod, never standardized
805 .PP
806 SVr2 (1984)
807 featured a new terminal driver,
808 extending the
809 .I curses
810 API to support it with
811 .IR \%cbreak ","
812 .IR \%nocbreak ","
813 .IR \%intrflush ","
814 .IR \%keypad ","
815 .IR \%meta ","
816 .IR \%nodelay ","
817 and
818 .IR \%typeahead "."
819 .PP
820 SVr3 (1987)
821 added
822 .IR \%halfdelay ","
823 .IR \%notimeout ","
824 and
825 .IR \%wtimeout "."
826 .I \%qiflush
827 and
828 .I \%noqiflush
829 appeared in SVr3.1 (1987),
830 at which point
831 .I \%intrflush
832 became a wrapper for either of these functions,
833 depending on the value of its Boolean argument.
834 SVr3.1 also added
835 .IR \%timeout "."
836 .PP
837 .I \%ncurses
838 6.5 (2024) introduced
839 .IR is_cbreak ","
840 .IR is_echo ","
841 .IR is_nl ","
842 and
843 .IR is_raw "."
844 .PP
845 Formerly,
846 .I \%ncurses
847 used
848 .I \%nl
849 and
850 .I \%nonl
851 to control the conversion of newlines to carriage return/line feed
852 on output as well as input.
853 X/Open Curses documents the use of these functions only for input.
854 This difference arose from converting the
855 .I \%pcurses
856 source (1986),
857 which used
858 \fI\%ioctl\fP(2) calls and the
859 .I \%sgttyb
860 structure,
861 to
862 .I \%termios
863 (the POSIX terminal API).
864 In the former,
865 both input and output conversions were controlled via a single option
866 \%\*(``CRMOD\*('',
867 while the latter separates these features.
868 Because that conversion interferes with output optimization,
869 .I \%ncurses
870 6.2 (2020) amended
871 .I \%nl
872 and
873 .I \%nonl
874 to eliminate their effect on output.
875 .SH SEE ALSO
876 \fB\%curses\fP(3X),
877 \fB\%curs_getch\fP(3X),
878 \fB\%curs_initscr\fP(3X),
879 \fB\%curs_util\fP(3X),
880 \fB\%define_key\fP(3X),
881 \fB\%termios\fP(3),
882 \fB\%term_variables\fP(3X)