HP-UX Reference (11i v1 00/12) - 3 Library Functions A-M (vol 6)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man3/!!!intro.3c
________________________________________________________________
___ ___
c
curses_intro(3X) curses_intro(3X)
(X/Open CURSES)
The complete set of key codes for keypad keys that Curses can process is specified by the constants defined
in <curses.h> whose names begin with ‘‘KEY_’’. Each terminal type described in the terminfo data-
base may support some or all of these key codes. The terminfo database specifies the sequence of input
characters from the terminal type that correspond to each key code (see Keypad in terminfo(4)).
The Curses implementation cannot translate keypad keys on terminals where pressing the keys does not
transmit a unique sequence.
When translation is enabled and a character that could be the beginning of a function key (such as escape)
is received, Curses notes the time and begins accumulating characters. If Curses receives additional char-
acters that represent the pressing of a keypad key, within an unspecified interval from the time the first
character was received, then Curses converts this input to a key code for presentation to the application. If
such characters are not received during this interval, translationof this input does not occur and the indivi-
dual characters are presented to the application separately. (Because Curses waits for this interval to accu-
mulate a key code, many terminals experience a delay between the time a user presses the escape key and
the time the escape is returned to the application.)
In addition, No Timeout Mode provides that in any case where Curses has received part of a function key
sequence, it waits indefinitely for the complete key sequence. The ‘‘unspecified interval’’ in the previous
paragraph becomes infinite in No Timeout Mode. No Timeout Mode allows the use of function keys over
slow communication lines. No Timeout Mode lets the user type the individual characters of a function key
sequence, but also delays application response when the user types a character (not a function key) that
begins a function key sequence. For this reason, in No Timeout Mode many terminals will appear to hang
between the time a user presses the escape key and the time another key is pressed. No Timeout Mode is
switchable by calling notimeout() .
If any special characters (see Special Characters in curses_intro) are defined or redefined to be characters
that are members of a function key sequence, then Curses will be unable to recognise and translate those
function keys.
Several of the modes discussed below are described in terms of availability of input. If keypad translation
is enabled, then input is not available once Curses has begun receiving a keypad sequence until the
sequence is completely received or the interval has elapsed.
Input Mode
The X/Open System Interface Definitions, Issue 4, Version 2 specification (Special Characters) defines flow-
control characters, the interrupt character, the erase character, and the kill character. Four mutually-
exclusive Curses modes let the application control the effect of these input characters:
Section 3−−122 − 10 − HP-UX Release 11i: December 2000
___
___