X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=doc%2Fhtml%2Fman%2Fcurs_inopts.3x.html;h=1d2db7213a897b79b1565d422162648f307245cf;hp=f0b188735e23c8331952bd6a503e5061d1acf29e;hb=ce4803687b821efbc5fb2c5a5f06d69cd4dc2656;hpb=b11cef1e315b58820ea0cde239ebf2f741ef8948;ds=sidebyside diff --git a/doc/html/man/curs_inopts.3x.html b/doc/html/man/curs_inopts.3x.html index f0b18873..1d2db721 100644 --- a/doc/html/man/curs_inopts.3x.html +++ b/doc/html/man/curs_inopts.3x.html @@ -1,6 +1,6 @@ @@ -45,16 +45,14 @@ - -
+
cbreak, nocbreak, echo, noecho, halfdelay, intrflush, keypad, meta, nodelay, notimeout, raw, noraw, noqiflush, qiflush, timeout, wtimeout, typeahead - curses input options --
+
#include <curses.h> int cbreak(void); @@ -76,8 +74,7 @@ int typeahead(int fd); --
+
The ncurses library provides several functions which let an application change the way input from the terminal is handled. Some are global, applying to all windows. Oth- @@ -87,8 +84,7 @@ the same behavior is needed. --
+
Normally, the tty driver buffers typed characters until a newline or carriage return is typed. The cbreak routine disables line buffering and erase/kill character-process- @@ -105,21 +101,19 @@ these routines interact with echo and noecho.] --
+
The echo and noecho routines control whether characters - typed by the user are echoed by getch as they are typed. - Echoing by the tty driver is always disabled, but initial- - ly getch is in echo mode, so characters typed are echoed. - Authors of most interactive programs prefer to do their - own echoing in a controlled area of the screen, or not to - echo at all, so they disable echoing by calling noecho. - [See curs_getch(3x) for a discussion of how these routines - interact with cbreak and nocbreak.] + typed by the user are echoed by getch(3x) as they are + typed. Echoing by the tty driver is always disabled, but + initially getch is in echo mode, so characters typed are + echoed. Authors of most interactive programs prefer to do + their own echoing in a controlled area of the screen, or + not to echo at all, so they disable echoing by calling + noecho. [See curs_getch(3x) for a discussion of how these + routines interact with cbreak and nocbreak.] --
+
The halfdelay routine is used for half-delay mode, which is similar to cbreak mode in that characters typed by the user are immediately available to the program. However, @@ -129,8 +123,7 @@ half-delay mode. --
+
If the intrflush option is enabled (bf is TRUE), and an interrupt key is pressed on the keyboard (interrupt, break, quit), all output in the tty driver queue will be @@ -142,23 +135,21 @@ nored. --
+
The keypad option enables the keypad of the user's termi- nal. If enabled (bf is TRUE), the user can press a func- - tion key (such as an arrow key) and wgetch returns a sin- - gle value representing the function key, as in KEY_LEFT. - If disabled (bf is FALSE), curses does not treat function - keys specially and the program has to interpret the escape - sequences itself. If the keypad in the terminal can be - turned on (made to transmit) and off (made to work local- - ly), turning on this option causes the terminal keypad to - be turned on when wgetch is called. The default value for - keypad is FALSE. - - --
+ tion key (such as an arrow key) and wgetch(3x) returns a + single value representing the function key, as in + KEY_LEFT. If disabled (bf is FALSE), curses does not + treat function keys specially and the program has to in- + terpret the escape sequences itself. If the keypad in the + terminal can be turned on (made to transmit) and off (made + to work locally), turning on this option causes the termi- + nal keypad to be turned on when wgetch(3x) is called. The + default value for keypad is FALSE. + + +
Initially, whether the terminal returns 7 or 8 significant bits on input depends on the control mode of the tty driv- er [see termio(7)]. To force 8 bits to be returned, in- @@ -173,22 +164,20 @@ FALSE) is called. --
+
The nodelay option causes getch to be a non-blocking call. If no input is ready, getch returns ERR. If disabled (bf is FALSE), getch waits until a key is pressed. - While interpreting an input escape sequence, wgetch sets a - timer while waiting for the next character. If notime- - out(win, TRUE) is called, then wgetch does not set a + While interpreting an input escape sequence, wgetch(3x) + sets a timer while waiting for the next character. If no- + timeout(win, TRUE) is called, then wgetch does not set a timer. The purpose of the timeout is to differentiate be- tween sequences received from a function key and those typed by a user. --
+
The raw and noraw routines place the terminal into or out of raw mode. Raw mode is similar to cbreak mode, in that characters typed are immediately passed through to the us- @@ -199,19 +188,17 @@ bits in the tty driver that are not set by curses. --
+
When the noqiflush routine is used, normal flush of input and output queues associated with the INTR, QUIT and SUSP characters will not be done [see termio(7)]. When qiflush is called, the queues will be flushed when these control - characters are read. You may want to call noqiflush() in - a signal handler if you want output to continue as though + characters are read. You may want to call noqiflush in a + signal handler if you want output to continue as though the interrupt had not occurred, after the handler exits. --
+
The timeout and wtimeout routines set blocking or non- blocking read for a given window. If delay is negative, blocking read is used (i.e., waits indefinitely for in- @@ -224,23 +211,21 @@ lay milliseconds (where delay is positive). --
+
The curses library does "line-breakout optimization" by looking for typeahead periodically while updating the screen. If input is found, and it is coming from a tty, - the current update is postponed until refresh or doupdate - is called again. This allows faster response to commands - typed in advance. Normally, the input FILE pointer passed - to newterm, or stdin in the case that initscr was used, - will be used to do this typeahead checking. The typeahead - routine specifies that the file descriptor fd is to be - used to check for typeahead instead. If fd is -1, then no - typeahead checking is done. + the current update is postponed until refresh(3x) or doup- + date is called again. This allows faster response to com- + mands typed in advance. Normally, the input FILE pointer + passed to newterm, or stdin in the case that initscr was + used, will be used to do this typeahead checking. The ty- + peahead routine specifies that the file descriptor fd is + to be used to check for typeahead instead. If fd is -1, + then no typeahead checking is done. --
+
All routines that return an integer return ERR upon fail- ure and OK (SVr4 specifies only "an integer value other than ERR") upon successful completion, unless otherwise @@ -256,8 +241,7 @@ the range 1..255. --
+
These functions are described in the XSI Curses standard, Issue 4. @@ -273,7 +257,7 @@ When keypad is first enabled, ncurses loads the key-defi- nitions for the current terminal description. If the ter- minal description includes extended string capabilities, - e.g., from using the -x option of tic, then ncurses also + e.g., from using the -x option of tic, then ncurses also defines keys for the capabilities whose names begin with "k". The corresponding keycodes are generated and (de- pending on previous loads of terminal descriptions) may @@ -284,7 +268,7 @@ curses key-names). On the other hand, an application can use define_key to establish a specific keycode for a given string. This makes it possible for an application to - check for an extended capability's presence with tigetstr, + check for an extended capability's presence with tigetstr, and reassign the keycode to match its own needs. Low-level applications can use tigetstr to obtain the def- @@ -304,22 +288,20 @@ used. --
+
Note that echo, noecho, halfdelay, intrflush, meta, node- lay, notimeout, noqiflush, qiflush, timeout, and wtimeout may be macros. The noraw and nocbreak calls follow historical practice in - that they attempt to restore to normal (`cooked') mode + that they attempt to restore to normal ("cooked") mode from raw and cbreak modes respectively. Mixing raw/noraw and cbreak/nocbreak calls leads to tty driver control states that are hard to predict or understand; it is not recommended. --
+
curses(3x), curs_getch(3x), curs_initscr(3x), curs_util(3x), define_key(3x), termio(7)