


curs_inopts(3X)                                   curs_inopts(3X)


NNAAMMEE
       ccuurrss__iinnooppttss:  ccbbrreeaakk,  nnooccbbrreeaakk,  eecchhoo, nnooeecchhoo, hhaallffddeellaayy,
       iinnttrrfflluusshh, kkeeyyppaadd, mmeettaa, nnooddeellaayy, nnoottiimmeeoouutt,  rraaww,  nnoorraaww,
       nnooqqiifflluusshh,  qqiifflluusshh, ttiimmeeoouutt, wwttiimmeeoouutt, ttyyppeeaahheeaadd - ccuurrsseess
       input options

SSYYNNOOPPSSIISS
       ##iinncclluuddee <<ccuurrsseess..hh>>

       iinntt ccbbrreeaakk((vvooiidd));;
       iinntt nnooccbbrreeaakk((vvooiidd));;
       iinntt eecchhoo((vvooiidd));;
       iinntt nnooeecchhoo((vvooiidd));;
       iinntt hhaallffddeellaayy((iinntt tteenntthhss));;
       iinntt iinnttrrfflluusshh((WWIINNDDOOWW **wwiinn,, bbooooll bbff));;
       iinntt kkeeyyppaadd((WWIINNDDOOWW **wwiinn,, bbooooll bbff));;
       iinntt mmeettaa((WWIINNDDOOWW **wwiinn,, bbooooll bbff));;
       iinntt nnooddeellaayy((WWIINNDDOOWW **wwiinn,, bbooooll bbff));;
       iinntt rraaww((vvooiidd));;
       iinntt nnoorraaww((vvooiidd));;
       vvooiidd nnooqqiifflluusshh((vvooiidd));;
       vvooiidd qqiifflluusshh((vvooiidd));;
       iinntt nnoottiimmeeoouutt((WWIINNDDOOWW **wwiinn,, bbooooll bbff));;
       vvooiidd ttiimmeeoouutt((iinntt ddeellaayy));;
       vvooiidd wwttiimmeeoouutt((WWIINNDDOOWW **wwiinn,, iinntt ddeellaayy));;
       iinntt ttyyppeeaahheeaadd((iinntt ffdd));;

DDEESSCCRRIIPPTTIIOONN
       Normally, the tty driver buffers typed characters until  a
       newline  or  carriage return is typed.  The ccbbrreeaakk routine
       disables  line   buffering   and   erase/kill   character-
       processing  (interrupt  and  flow  control  characters are
       unaffected), making characters typed by the  user  immedi-
       ately  available  to  the  program.   The nnooccbbrreeaakk routine
       returns the terminal to normal (cooked) mode.

       Initially the terminal may or may not be in  ccbbrreeaakk  mode,
       as the mode is inherited; therefore, a program should call
       ccbbrreeaakk or nnooccbbrreeaakk explicitly.  Most interactive  programs
       using  ccuurrsseess set the ccbbrreeaakk mode.  Note that ccbbrreeaakk over-
       rides rraaww.  [See curs_getch(3X) for a  discussion  of  how
       these routines interact with eecchhoo and nnooeecchhoo.]

       The  eecchhoo  and  nnooeecchhoo routines control whether characters
       typed by the user are echoed by ggeettcchh as they  are  typed.
       Echoing  by  the  tty  driver is always disabled, but ini-
       tially ggeettcchh 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
       nnooeecchhoo.  [See curs_getch(3X) for a discussion of how these
       routines interact with ccbbrreeaakk and nnooccbbrreeaakk.]

       The  hhaallffddeellaayy  routine is used for half-delay mode, which



                                                                1





curs_inopts(3X)                                   curs_inopts(3X)


       is similar to ccbbrreeaakk mode in that characters typed by  the
       user  are  immediately available to the program.  However,
       after blocking  for  _t_e_n_t_h_s  tenths  of  seconds,  ERR  is
       returned  if  nothing has been typed.  The value of tteenntthhss
       must be a number between 1 and 255.  Use nnooccbbrreeaakk to leave
       half-delay mode.

       If  the iinnttrrfflluusshh option is enabled, (_b_f is TTRRUUEE), when an
       interrupt key  is  pressed  on  the  keyboard  (interrupt,
       break,  quit)  all  output in the tty driver queue will be
       flushed, giving the  effect  of  faster  response  to  the
       interrupt,  but  causing  ccuurrsseess to have the wrong idea of
       what is on the  screen.   Disabling  (_b_f  is  FFAALLSSEE),  the
       option  prevents the flush.  The default for the option is
       inherited from the tty driver settings.  The window  argu-
       ment is ignored.

       The  kkeeyyppaadd option enables the keypad of the user's termi-
       nal.  If enabled (_b_f is TTRRUUEE), the user can press a  func-
       tion  key (such as an arrow key) and wwggeettcchh returns a sin-
       gle value representing the function key, as  in  KKEEYY__LLEEFFTT.
       If  disabled (_b_f is FFAALLSSEE), ccuurrsseess 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
       locally),  turning on this option causes the terminal key-
       pad to be turned on when wwggeettcchh 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
       driver  [see  termio(7)].  To force 8 bits to be returned,
       invoke mmeettaa(_w_i_n, TTRRUUEE); this is equivalent,  under  POSIX,
       to  setting the CS8 flag on the terminal.  To force 7 bits
       to be returned, invoke mmeettaa(_w_i_n, FFAALLSSEE); this  is  equiva-
       lent,  under  POSIX, to setting the CS8 flag on the termi-
       nal.  The window argument, _w_i_n, is always ignored.  If the
       terminfo capabilities ssmmmm (meta_on) and rrmmmm (meta_off) are
       defined for the terminal, ssmmmm is sent to the terminal when
       mmeettaa(_w_i_n,  TTRRUUEE)  is called and rrmmmm is sent when mmeettaa(_w_i_n,
       FFAALLSSEE) is called.

       The nnooddeellaayy option causes ggeettcchh to be a non-blocking call.
       If  no input is ready, ggeettcchh returns EERRRR.  If disabled (_b_f
       is FFAALLSSEE), ggeettcchh waits until a key is pressed.

       While interpreting an input escape sequence, wwggeettcchh sets a
       timer  while  waiting  for the next character.  If nnoottiimmee--
       oouutt((_w_i_n, TTRRUUEE) is called,  then  wwggeettcchh  does  not  set  a
       timer.   The  purpose  of  the timeout is to differentiate
       between sequences received from a function key  and  those
       typed by a user.

       The  rraaww and nnoorraaww routines place the terminal into or out



                                                                2





curs_inopts(3X)                                   curs_inopts(3X)


       of raw mode.  Raw mode is similar to ccbbrreeaakk mode, in  that
       characters  typed  are  immediately  passed through to the
       user program.  The differences are that in raw  mode,  the
       interrupt,  quit, suspend, and flow control characters are
       all passed through uninterpreted, instead of generating  a
       signal.   The  behavior  of the BREAK key depends on other
       bits in the tty driver that are not set by ccuurrsseess.

       When the nnooqqiifflluusshh routine is used, normal flush of  input
       and  output queues associated with the IINNTTRR, QQUUIITT and SSUUSSPP
       characters will not be done [see termio(7)].  When qqiifflluusshh
       is  called,  the queues will be flushed when these control
       characters are read.  You may want to call nnooqqiifflluusshh(())  in
       a  signal handler if you want output to continue as though
       the interrupt had not occurred, after the handler exits.

       The ttiimmeeoouutt and wwttiimmeeoouutt routines  set  blocking  or  non-
       blocking  read  for a given window.  If _d_e_l_a_y is negative,
       blocking  read  is  used  (_i._e.,  waits  indefinitely  for
       input).   If _d_e_l_a_y is zero, then non-blocking read is used
       (_i._e., read returns EERRRR if no input is waiting).  If _d_e_l_a_y
       is  positive, then read blocks for _d_e_l_a_y milliseconds, and
       returns EERRRR if there is still no input.  Hence, these rou-
       tines  provide the same functionality as nnooddeellaayy, plus the
       additional capability of being  able  to  block  for  only
       _d_e_l_a_y milliseconds (where _d_e_l_a_y is positive).

       The  ccuurrsseess 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 rreeffrreesshh or  ddoouuppddaattee
       is  called again.  This allows faster response to commands
       typed in advance.  Normally, the input FILE pointer passed
       to  nneewwtteerrmm,  or  ssttddiinn in the case that iinniittssccrr was used,
       will be used to do this typeahead checking.  The ttyyppeeaahheeaadd
       routine  specifies  that  the  file descriptor _f_d is to be
       used to check for typeahead instead.  If _f_d is -1, then no
       typeahead checking is done.

RREETTUURRNN VVAALLUUEE
       All  routines that return an integer return EERRRR upon fail-
       ure and OK (SVr4 specifies only "an  integer  value  other
       than  EERRRR")  upon  successful completion, unless otherwise
       noted in the preceding routine descriptions.

PPOORRTTAABBIILLIITTYY
       These functions are described in the XSI Curses  standard,
       Issue 4.

NNOOTTEESS
       Note  that eecchhoo, nnooeecchhoo, hhaallffddeellaayy, iinnttrrfflluusshh, mmeettaa, nnooddee--
       llaayy, nnoottiimmeeoouutt, nnooqqiifflluusshh, qqiifflluusshh, ttiimmeeoouutt, and  wwttiimmeeoouutt
       may be macros.




                                                                3





curs_inopts(3X)                                   curs_inopts(3X)


SSEEEE AALLSSOO
       ccuurrsseess(3X), ccuurrss__ggeettcchh(3X), ccuurrss__iinniittssccrr(3X), tteerrmmiioo(7)























































                                                                4


