libtty.tex 1.2 KB
Newer Older
1 2 3 4 5 6
\section{\module{tty} ---
         Terminal control functions}

\declaremodule{standard}{tty}
  \platform{Unix}
\moduleauthor{Steen Lumholt}{}
7
\sectionauthor{Moshe Zadka}{moshez@zadka.site.co.il}
8 9 10 11 12 13 14
\modulesynopsis{Utility functions that perform common terminal control
                operations.}

The \module{tty} module defines functions for putting the tty into
cbreak and raw modes.

Because it requires the \refmodule{termios} module, it will work
15
only on \UNIX.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36

The \module{tty} module defines the following functions:

\begin{funcdesc}{setraw}{fd\optional{, when}}
Change the mode of the file descriptor \var{fd} to raw. If \var{when}
is omitted, it defaults to \constant{TERMIOS.TCAFLUSH}, and is passed
to \function{termios.tcsetattr()}.
\end{funcdesc}

\begin{funcdesc}{setcbreak}{fd\optional{, when}}
Change the mode of file descriptor \var{fd} to cbreak. If \var{when}
is omitted, it defaults to \constant{TERMIOS.TCAFLUSH}, and is passed
to \function{termios.tcsetattr()}.
\end{funcdesc}


\begin{seealso}
  \seemodule{termios}{Low-level terminal control interface.}
  \seemodule[TERMIOSuppercase]{TERMIOS}{Constants useful for terminal
                                        control operations.}
\end{seealso}