<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>luaposix 33.3.0 Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>luaposix 33.3.0</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
<li><a href="#Constants">Constants </a></li>
</ul>
<h2>Modules</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../modules/posix.html">posix</a></li>
<li><a href="../modules/posix.ctype.html">posix.ctype</a></li>
<li><strong>posix.curses</strong></li>
<li><a href="../modules/posix.dirent.html">posix.dirent</a></li>
<li><a href="../modules/posix.errno.html">posix.errno</a></li>
<li><a href="../modules/posix.fcntl.html">posix.fcntl</a></li>
<li><a href="../modules/posix.fnmatch.html">posix.fnmatch</a></li>
<li><a href="../modules/posix.getopt.html">posix.getopt</a></li>
<li><a href="../modules/posix.glob.html">posix.glob</a></li>
<li><a href="../modules/posix.grp.html">posix.grp</a></li>
<li><a href="../modules/posix.libgen.html">posix.libgen</a></li>
<li><a href="../modules/posix.poll.html">posix.poll</a></li>
<li><a href="../modules/posix.pwd.html">posix.pwd</a></li>
<li><a href="../modules/posix.sched.html">posix.sched</a></li>
<li><a href="../modules/posix.signal.html">posix.signal</a></li>
<li><a href="../modules/posix.stdio.html">posix.stdio</a></li>
<li><a href="../modules/posix.stdlib.html">posix.stdlib</a></li>
<li><a href="../modules/posix.sys.msg.html">posix.sys.msg</a></li>
<li><a href="../modules/posix.sys.resource.html">posix.sys.resource</a></li>
<li><a href="../modules/posix.sys.socket.html">posix.sys.socket</a></li>
<li><a href="../modules/posix.sys.stat.html">posix.sys.stat</a></li>
<li><a href="../modules/posix.sys.statvfs.html">posix.sys.statvfs</a></li>
<li><a href="../modules/posix.sys.time.html">posix.sys.time</a></li>
<li><a href="../modules/posix.sys.times.html">posix.sys.times</a></li>
<li><a href="../modules/posix.sys.utsname.html">posix.sys.utsname</a></li>
<li><a href="../modules/posix.sys.wait.html">posix.sys.wait</a></li>
<li><a href="../modules/posix.syslog.html">posix.syslog</a></li>
<li><a href="../modules/posix.termio.html">posix.termio</a></li>
<li><a href="../modules/posix.time.html">posix.time</a></li>
<li><a href="../modules/posix.unistd.html">posix.unistd</a></li>
<li><a href="../modules/posix.utime.html">posix.utime</a></li>
</ul>
<h2>Classes</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../classes/posix.curses.chstr.html">posix.curses.chstr</a></li>
<li><a href="../classes/posix.curses.window.html">posix.curses.window</a></li>
</ul>
<h2>Examples</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../examples/curses.lua.html">curses.lua</a></li>
<li><a href="../examples/dir.lua.html">dir.lua</a></li>
<li><a href="../examples/fork.lua.html">fork.lua</a></li>
<li><a href="../examples/fork2.lua.html">fork2.lua</a></li>
<li><a href="../examples/getopt.lua.html">getopt.lua</a></li>
<li><a href="../examples/glob.lua.html">glob.lua</a></li>
<li><a href="../examples/limit.lua.html">limit.lua</a></li>
<li><a href="../examples/lock.lua.html">lock.lua</a></li>
<li><a href="../examples/netlink-uevent.lua.html">netlink-uevent.lua</a></li>
<li><a href="../examples/ping.lua.html">ping.lua</a></li>
<li><a href="../examples/poll.lua.html">poll.lua</a></li>
<li><a href="../examples/rt_sched.lua.html">rt_sched.lua</a></li>
<li><a href="../examples/signal.lua.html">signal.lua</a></li>
<li><a href="../examples/socket.lua.html">socket.lua</a></li>
<li><a href="../examples/termios.lua.html">termios.lua</a></li>
<li><a href="../examples/tree.lua.html">tree.lua</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>posix.curses</code></h1>
<p>Full-screen Text Terminal Manipulation.</p>
<p> In the underlying curses C library, the following functions:</p>
<pre>
getstr() (<span class="keyword">and</span> wgetstr(), mvgetstr(), <span class="keyword">and</span> mvwgetstr())
inchstr() (<span class="keyword">and</span> winchstr(), mvinchstr(), <span class="keyword">and</span> mvwinchstr())
instr() (<span class="keyword">and</span> winstr(), mvinstr(), <span class="keyword">and</span> mvwinstr())
</pre>
<p> are subject to buffer overflow attack. This is because you pass in the
buffer to be filled in, which has to be of finite length. But in this
Lua module, a buffer is assigned automatically and the function returns
the string, so there is no security issue. You may still use the alternate
functions:</p>
<pre>
s = stdscr:getnstr()
s = stdscr:inchnstr()
s = stdscr:innstr()
</pre>
<p> which take an extra "size of buffer" argument, in order to impose a maximum
length on the string the user may type in.</p>
<p> Some of the C functions beginning with "no" do not exist in Lua. You should
use <code>curses.nl(false)</code> and <code>curses.nl(true)</code> instead of <code>nonl()</code> and <code>nl()</code>,
and likewise <code>curses.echo(false)</code> and <code>curses.echo(true)</code> instead of
<code>noecho()</code> and <code>echo()</code> .</p>
<p> In this Lua module the <code>stdscr:getch()</code> function always returns an integer.
In C, a single character is an integer, but in Lua (and Perl) a single
character is a short string. The Perl Curses function <code>getch()</code> returns a
char if it was a char, and a number if it was a constant; to get this
behaviour in Lua you have to convert explicitly, e.g.:</p>
<pre>
<span class="keyword">if</span> c < <span class="number">256</span> <span class="keyword">then</span> c = <span class="global">string</span>.char(c) <span class="keyword">end</span>
</pre>
<p> Some Lua functions take a different set of parameters than their C
counterparts; for example, you should use <code>str = stdscr.getstr()</code> and
<code>y, x = stdscr.getyx()</code> instead of <code>getstr(str)</code> and <code>getyx(y, x)</code>, and
likewise for <code>getbegyx</code> and <code>getmaxyx</code> and <code>getparyx</code> and <code>pair_content</code>.
The Perl Curses module now uses the C-compatible parameters, so be aware of
this difference when translating code from Perl into Lua, as well as from C
into Lua.</p>
<p> Many curses functions have variants starting with the prefixes <code>w-</code>, <code>mv-</code>,
and/or <code>wmv-</code>. These variants differ only in the explicit addition of a
window, or by the addition of two coordinates that are used to move the
cursor first. For example, in C <code>addch()</code> has three other variants:
<code>waddch()</code>, <code>mvaddch()</code> and <code>mvwaddch()</code>. The Lua equivalents,
respectively being <code>stdscr:addch()</code>, <code>somewindow:addch()</code>,
<code>stdscr:mvaddch()</code> and <code>somewindow:mvaddch()</code>, with the window argument
passed implicitly with Lua's <code>:</code> syntax sugar.</p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#baudrate">baudrate ()</a></td>
<td class="summary">Fetch the output speed of the terminal.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#beep">beep ()</a></td>
<td class="summary">Send the terminal audible bell.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#cbreak">cbreak ([on])</a></td>
<td class="summary">Put the terminal into cbreak mode.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#color_pair">color_pair (pair)</a></td>
<td class="summary">Return the attributes for the given color pair id.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#color_pairs">color_pairs ()</a></td>
<td class="summary">How may distinct color pairs are supported by this terminal?</td>
</tr>
<tr>
<td class="name" nowrap><a href="#colors">colors ()</a></td>
<td class="summary">How many colors are available for this terminal?</td>
</tr>
<tr>
<td class="name" nowrap><a href="#cols">cols ()</a></td>
<td class="summary">Number of columns in the main screen window.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#curs_set">curs_set (vis)</a></td>
<td class="summary">Change the visibility of the cursor.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#delay_output">delay_output (ms)</a></td>
<td class="summary">Insert padding characters to force a short delay.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#doupdate">doupdate ()</a></td>
<td class="summary">Refresh the visible terminal screen.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#echo">echo ([on])</a></td>
<td class="summary">Whether characters are echoed to the terminal as they are typed.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#endwin">endwin ()</a></td>
<td class="summary">Clean up terminal prior to exiting or escaping curses.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#erasechar">erasechar ()</a></td>
<td class="summary">Fetch the terminal's current erase character.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#flash">flash ()</a></td>
<td class="summary">Send the terminal visible bell.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#flushinp">flushinp ()</a></td>
<td class="summary">Throw away any typeahead in the keyboard input buffer.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#halfdelay">halfdelay (tenths)</a></td>
<td class="summary">Put the terminal into halfdelay mode.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#has_colors">has_colors ()</a></td>
<td class="summary">Does the terminal have color capability?</td>
</tr>
<tr>
<td class="name" nowrap><a href="#has_ic">has_ic ()</a></td>
<td class="summary">Fetch the character insert and delete capability of the terminal.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#has_il">has_il ()</a></td>
<td class="summary">Fetch the line insert and delete capability of the terminal.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#init_pair">init_pair (pair, f, b)</a></td>
<td class="summary">Associate a color pair id with a specific foreground and background color.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#initscr">initscr ()</a></td>
<td class="summary">Initialise screen.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#isendwin">isendwin ()</a></td>
<td class="summary">Has <a href="../modules/posix.curses.html#endwin">endwin</a> been called more recently than <a href="../classes/posix.curses.window.html#posix.curses.window:refresh">posix.curses.window:refresh</a>?</td>
</tr>
<tr>
<td class="name" nowrap><a href="#keyname">keyname (c)</a></td>
<td class="summary">Return a printable representation of a key.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#killchar">killchar ()</a></td>
<td class="summary">Fetch the terminal's current kill character.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#lines">lines ()</a></td>
<td class="summary">Number of lines in the main screen window.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#longname">longname ()</a></td>
<td class="summary">Fetch the verbose name of the terminal.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#napms">napms (ms)</a></td>
<td class="summary">Sleep for a few milliseconds.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#new_chstr">new_chstr (len)</a></td>
<td class="summary">Create a new line drawing buffer instance.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#newpad">newpad (nlines, ncols)</a></td>
<td class="summary">Create a new pad.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#newwin">newwin (nlines, ncols, begin_y, begin_x)</a></td>
<td class="summary">Create a new window.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#nl">nl ([on])</a></td>
<td class="summary">Whether to translate a return key to newline on input.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#pair_content">pair_content (pair)</a></td>
<td class="summary">Return the foreground and background colors associated with a color pair id.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#raw">raw ([on])</a></td>
<td class="summary">Put the terminal into raw mode.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#resizeterm">resizeterm (nlines, ncols)</a></td>
<td class="summary">Change the terminal size.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#ripoffline">ripoffline (top_line, callback)</a></td>
<td class="summary">Reduce the available size of the main screen.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#slk_attroff">slk_attroff (attrs)</a></td>
<td class="summary">Disable an attribute for soft labels.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#slk_attron">slk_attron (attrs)</a></td>
<td class="summary">Enable an attribute for soft labels.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#slk_attrset">slk_attrset (attrs)</a></td>
<td class="summary">Set the attributes for soft labels.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#slk_clear">slk_clear ()</a></td>
<td class="summary">Clears the soft labels from the screen.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#slk_init">slk_init (fmt)</a></td>
<td class="summary">Initialise the soft label keys area.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#slk_label">slk_label (labnum)</a></td>
<td class="summary">Fetch the label for a soft label key.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#slk_noutrefresh">slk_noutrefresh ()</a></td>
<td class="summary">Copy the soft label key area backing screen to the virtual screen.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#slk_refresh">slk_refresh ()</a></td>
<td class="summary">Refresh the soft label key area.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#slk_restore">slk_restore ()</a></td>
<td class="summary">Restores the soft labels to the screen.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#slk_set">slk_set (labnum, label, fmt)</a></td>
<td class="summary">Set the label for a soft label key.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#slk_touch">slk_touch ()</a></td>
<td class="summary">Mark the soft label key area for refresh.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#start_color">start_color ()</a></td>
<td class="summary">Initialise color output facility.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#stdscr">stdscr ()</a></td>
<td class="summary">Retern the main screen window.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#termattrs">termattrs ([a])</a></td>
<td class="summary">Bitwise OR of all (or selected) video attributes supported by the terminal.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#termname">termname ()</a></td>
<td class="summary">Fetch the name of the terminal.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#tigetflag">tigetflag (capname)</a></td>
<td class="summary">Fetch terminfo boolean capability.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#tigetnum">tigetnum (capname)</a></td>
<td class="summary">Fetch terminfo numeric capability.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#tigetstr">tigetstr (capname)</a></td>
<td class="summary">Fetch terminfo string capability.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#unctrl">unctrl (c)</a></td>
<td class="summary">Return a printable representation of a character, ignoring attributes.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#ungetch">ungetch (c)</a></td>
<td class="summary">Return a character to the keyboard input buffer.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#use_default_colors">use_default_colors ()</a></td>
<td class="summary">Reserve <code>-1</code> to represent terminal default colors.</td>
</tr>
</table>
<h2><a href="#Constants">Constants </a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#posix.curses">posix.curses</a></td>
<td class="summary">Curses constants.</td>
</tr>
</table>
<br/>
<br/>
<h2><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "baudrate"></a>
<strong>baudrate ()</strong>
</dt>
<dd>
Fetch the output speed of the terminal.
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">int</span></span>
output speed of the terminal in bits-per-second
</ol>
<h3>See also:</h3>
<ul>
<a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_termattrs.html">curs_termattrs(3x)</a>
</ul>
</dd>
<dt>
<a name = "beep"></a>
<strong>beep ()</strong>
</dt>
<dd>
Send the terminal audible bell.
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
<code>true</code>, if successful
</ol>
<h3>See also:</h3>
<ul>
<li><a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_beep.html">curs_beep(3x)</a></li>
<li><a href="../modules/posix.curses.html#flash">flash</a></li>
</ul>
</dd>
<dt>
<a name = "cbreak"></a>
<strong>cbreak ([on])</strong>
</dt>
<dd>
Put the terminal into cbreak mode.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">on</span>
<span class="types"><span class="type">bool</span></span>
(<em>optional</em>)
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
<code>true</code>, if successful
</ol>
<h3>See also:</h3>
<ul>
<a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_inopts.html">curs_inopts(3x)</a>
</ul>
</dd>
<dt>
<a name = "color_pair"></a>
<strong>color_pair (pair)</strong>
</dt>
<dd>
Return the attributes for the given color pair id.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">pair</span>
<span class="types"><span class="type">int</span></span>
color pair id to act on
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">int</span></span>
attributes for color pair <em>pair</em>
</ol>
<h3>See also:</h3>
<ul>
<a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_color.html">curs_color(3x)</a>
</ul>
</dd>
<dt>
<a name = "color_pairs"></a>
<strong>color_pairs ()</strong>
</dt>
<dd>
How may distinct color pairs are supported by this terminal?
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">int</span></span>
total number of available color pairs
</ol>
<h3>See also:</h3>
<ul>
<li><a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_color.html">curs_color(3x)</a></li>
<li><a href="../modules/posix.curses.html#colors">colors</a></li>
</ul>
</dd>
<dt>
<a name = "colors"></a>
<strong>colors ()</strong>
</dt>
<dd>
How many colors are available for this terminal?
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">int</span></span>
total number of available colors
</ol>
<h3>See also:</h3>
<ul>
<li><a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_color.html">curs_color(3x)</a></li>
<li><a href="../modules/posix.curses.html#color_pairs">color_pairs</a></li>
</ul>
</dd>
<dt>
<a name = "cols"></a>
<strong>cols ()</strong>
</dt>
<dd>
Number of columns in the main screen window.
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">int</span></span>
number of columns in the main screen
</ol>
<h3>See also:</h3>
<ul>
<li><a href="../modules/posix.curses.html#lines">lines</a></li>
<li><a href="../modules/posix.curses.html#stdscr">stdscr</a></li>
</ul>
</dd>
<dt>
<a name = "curs_set"></a>
<strong>curs_set (vis)</strong>
</dt>
<dd>
Change the visibility of the cursor.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">vis</span>
<span class="types"><span class="type">int</span></span>
one of <code>0</code> (invisible), <code>1</code> (visible) or <code>2</code> (very visible)
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">int</span></span>
previous cursor state
</ol>
<h3>Or</h3>
<ol>
nil if <em>vis</em> is not supported
</ol>
<h3>See also:</h3>
<ul>
<a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_kernel.html">curs_kernel(3x)</a>
</ul>
</dd>
<dt>
<a name = "delay_output"></a>
<strong>delay_output (ms)</strong>
</dt>
<dd>
Insert padding characters to force a short delay.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">ms</span>
<span class="types"><span class="type">int</span></span>
delay time in milliseconds
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
<code>true</code>, if successful
</ol>
<h3>See also:</h3>
<ul>
<li><a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_util.html">curs_util(3x)</a></li>
<li><a href="../modules/posix.curses.html#napms">napms</a></li>
</ul>
</dd>
<dt>
<a name = "doupdate"></a>
<strong>doupdate ()</strong>
</dt>
<dd>
Refresh the visible terminal screen.
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
<code>true</code>, if successful
</ol>
<h3>See also:</h3>
<ul>
<li><a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_refresh.html">curs_refresh(3x)</a></li>
<li><a href="../classes/posix.curses.window.html#posix.curses.window:refresh">posix.curses.window:refresh</a></li>
</ul>
</dd>
<dt>
<a name = "echo"></a>
<strong>echo ([on])</strong>
</dt>
<dd>
Whether characters are echoed to the terminal as they are typed.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">on</span>
<span class="types"><span class="type">bool</span></span>
(<em>optional</em>)
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
<code>true</code>, if successful
</ol>
<h3>See also:</h3>
<ul>
<a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_inopts.html">curs_inopts(3x)</a>
</ul>
</dd>
<dt>
<a name = "endwin"></a>
<strong>endwin ()</strong>
</dt>
<dd>
Clean up terminal prior to exiting or escaping curses.
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
<code>true</code>, if successful
</ol>
<h3>See also:</h3>
<ul>
<a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_initscr.html">curs_initscr(3x)</a>
</ul>
</dd>
<dt>
<a name = "erasechar"></a>
<strong>erasechar ()</strong>
</dt>
<dd>
Fetch the terminal's current erase character.
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">int</span></span>
current erase character
</ol>
<h3>See also:</h3>
<ul>
<a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_termattrs.html">curs_termattrs(3x)</a>
</ul>
</dd>
<dt>
<a name = "flash"></a>
<strong>flash ()</strong>
</dt>
<dd>
Send the terminal visible bell.
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
<code>true</code>, if successful
</ol>
<h3>See also:</h3>
<ul>
<li><a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_beep.html">curs_beep(3x)</a></li>
<li><a href="../modules/posix.curses.html#beep">beep</a></li>
</ul>
</dd>
<dt>
<a name = "flushinp"></a>
<strong>flushinp ()</strong>
</dt>
<dd>
Throw away any typeahead in the keyboard input buffer.
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
<code>true</code>, if successful
</ol>
<h3>See also:</h3>
<ul>
<li><a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_util.html">curs_util(3x)</a></li>
<li><a href="../modules/posix.curses.html#ungetch">ungetch</a></li>
</ul>
</dd>
<dt>
<a name = "halfdelay"></a>
<strong>halfdelay (tenths)</strong>
</dt>
<dd>
Put the terminal into halfdelay mode.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">tenths</span>
<span class="types"><span class="type">int</span></span>
delay in tenths of a second
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
<code>true</code>, if successful
</ol>
<h3>See also:</h3>
<ul>
<a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_inopts.html">curs_inopts(3x)</a>
</ul>
</dd>
<dt>
<a name = "has_colors"></a>
<strong>has_colors ()</strong>
</dt>
<dd>
Does the terminal have color capability?
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
<code>true</code>, if the terminal supports colors
</ol>
<h3>See also:</h3>
<ul>
<li><a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_color.html">curs_color(3x)</a></li>
<li><a href="../modules/posix.curses.html#start_color">start_color</a></li>
</ul>
<h3>Usage:</h3>
<ul>
<pre class="example">
<span class="keyword">if</span> curses.has_colors () <span class="keyword">then</span>
curses.start_color ()
<span class="keyword">end</span></pre>
</ul>
</dd>
<dt>
<a name = "has_ic"></a>
<strong>has_ic ()</strong>
</dt>
<dd>
Fetch the character insert and delete capability of the terminal.
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
<code>true</code>, if the terminal has insert and delete character
operations
</ol>
<h3>See also:</h3>
<ul>
<a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_termattrs.html">curs_termattrs(3x)</a>
</ul>
</dd>
<dt>
<a name = "has_il"></a>
<strong>has_il ()</strong>
</dt>
<dd>
Fetch the line insert and delete capability of the terminal.
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
<code>true</code>, if the terminal has insert and delete line operations
</ol>
<h3>See also:</h3>
<ul>
<a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_termattrs.html">curs_termattrs(3x)</a>
</ul>
</dd>
<dt>
<a name = "init_pair"></a>
<strong>init_pair (pair, f, b)</strong>
</dt>
<dd>
Associate a color pair id with a specific foreground and background color.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">pair</span>
<span class="types"><span class="type">int</span></span>
color pair id to act on
</li>
<li><span class="parameter">f</span>
<span class="types"><span class="type">int</span></span>
foreground color to assign
</li>
<li><span class="parameter">b</span>
<span class="types"><span class="type">int</span></span>
background color to assign
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
<code>true</code>, if successful
</ol>
<h3>See also:</h3>
<ul>
<li><a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_color.html">curs_color(3x)</a></li>
<li><a href="../modules/posix.curses.html#pair_content">pair_content</a></li>
</ul>
</dd>
<dt>
<a name = "initscr"></a>
<strong>initscr ()</strong>
</dt>
<dd>
Initialise screen.
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">window</span></span>
main screen
</ol>
<h3>See also:</h3>
<ul>
<a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_initscr.html">curs_initscr(3x)</a>
</ul>
</dd>
<dt>
<a name = "isendwin"></a>
<strong>isendwin ()</strong>
</dt>
<dd>
Has <a href="../modules/posix.curses.html#endwin">endwin</a> been called more recently than <a href="../classes/posix.curses.window.html#posix.curses.window:refresh">posix.curses.window:refresh</a>?
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
whether <a href="../modules/posix.curses.html#endwin">endwin</a> has been called
</ol>
<h3>See also:</h3>
<ul>
<a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_initscr.html">curs_initscr(3x)</a>
</ul>
</dd>
<dt>
<a name = "keyname"></a>
<strong>keyname (c)</strong>
</dt>
<dd>
Return a printable representation of a key.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">c</span>
<span class="types"><span class="type">int</span></span>
a key
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="http://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
key name of <em>c</em>
</ol>
<h3>See also:</h3>
<ul>
<li><a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_util.html">curs_util(3x)</a></li>
<li><a href="../modules/posix.curses.html#unctrl">unctrl</a></li>
</ul>
</dd>
<dt>
<a name = "killchar"></a>
<strong>killchar ()</strong>
</dt>
<dd>
Fetch the terminal's current kill character.
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">int</span></span>
current line kill character
</ol>
<h3>See also:</h3>
<ul>
<a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_termattrs.html">curs_termattrs(3x)</a>
</ul>
</dd>
<dt>
<a name = "lines"></a>
<strong>lines ()</strong>
</dt>
<dd>
Number of lines in the main screen window.
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">int</span></span>
number of lines in the main screen
</ol>
<h3>See also:</h3>
<ul>
<li><a href="../modules/posix.curses.html#cols">cols</a></li>
<li><a href="../modules/posix.curses.html#stdscr">stdscr</a></li>
</ul>
</dd>
<dt>
<a name = "longname"></a>
<strong>longname ()</strong>
</dt>
<dd>
Fetch the verbose name of the terminal.
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="http://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
verbose description of the current terminal
</ol>
<h3>See also:</h3>
<ul>
<a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_termattrs.html">curs_termattrs(3x)</a>
</ul>
</dd>
<dt>
<a name = "napms"></a>
<strong>napms (ms)</strong>
</dt>
<dd>
Sleep for a few milliseconds.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">ms</span>
<span class="types"><span class="type">int</span></span>
time to wait in milliseconds
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
<code>true</code>, if successful
</ol>
<h3>See also:</h3>
<ul>
<li><a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_kernel.html">curs_kernel(3x)</a></li>
<li><a href="../modules/posix.curses.html#delay_output">delay_output</a></li>
</ul>
</dd>
<dt>
<a name = "new_chstr"></a>
<strong>new_chstr (len)</strong>
</dt>
<dd>
Create a new line drawing buffer instance.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">len</span>
<span class="types"><span class="type">int</span></span>
number of element to allocate
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">chstr</span></span>
a new char buffer object
</ol>
<h3>See also:</h3>
<ul>
<a href="../classes/posix.curses.chstr.html#">posix.curses.chstr</a>
</ul>
</dd>
<dt>
<a name = "newpad"></a>
<strong>newpad (nlines, ncols)</strong>
</dt>
<dd>
Create a new pad.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">nlines</span>
<span class="types"><span class="type">int</span></span>
</li>
<li><span class="parameter">ncols</span>
<span class="types"><span class="type">int</span></span>
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
<code>true</code>, if successful
</ol>
<h3>See also:</h3>
<ul>
<a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/cur_pad.html">cur_pad(3x)</a>
</ul>
</dd>
<dt>
<a name = "newwin"></a>
<strong>newwin (nlines, ncols, begin_y, begin_x)</strong>
</dt>
<dd>
Create a new window.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">nlines</span>
<span class="types"><span class="type">int</span></span>
number of window lines
</li>
<li><span class="parameter">ncols</span>
<span class="types"><span class="type">int</span></span>
number of window columns
</li>
<li><span class="parameter">begin_y</span>
<span class="types"><span class="type">int</span></span>
top line of window
</li>
<li><span class="parameter">begin_x</span>
<span class="types"><span class="type">int</span></span>
leftmost column of window
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">window</span></span>
a new window object
</ol>
<h3>See also:</h3>
<ul>
<li><a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_window.html">curs_window(3x)</a></li>
<li><a href="../classes/posix.curses.window.html#">posix.curses.window</a></li>
</ul>
</dd>
<dt>
<a name = "nl"></a>
<strong>nl ([on])</strong>
</dt>
<dd>
Whether to translate a return key to newline on input.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">on</span>
<span class="types"><span class="type">bool</span></span>
(<em>optional</em>)
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
<code>true</code>, if successful
</ol>
<h3>See also:</h3>
<ul>
<a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_outopts.html">curs_outopts(3x)</a>
</ul>
</dd>
<dt>
<a name = "pair_content"></a>
<strong>pair_content (pair)</strong>
</dt>
<dd>
Return the foreground and background colors associated with a color pair id.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">pair</span>
<span class="types"><span class="type">int</span></span>
color pair id to act on
</li>
</ul>
<h3>Returns:</h3>
<ol>
<li>
<span class="types"><span class="type">int</span></span>
foreground color of <em>pair</em></li>
<li>
<span class="types"><span class="type">int</span></span>
background color of <em>pair</em></li>
</ol>
<h3>See also:</h3>
<ul>
<li><a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_color.html">curs_color(3x)</a></li>
<li><a href="../modules/posix.curses.html#init_pair">init_pair</a></li>
</ul>
</dd>
<dt>
<a name = "raw"></a>
<strong>raw ([on])</strong>
</dt>
<dd>
Put the terminal into raw mode.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">on</span>
<span class="types"><span class="type">bool</span></span>
(<em>optional</em>)
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
<code>true</code>, if successful
</ol>
<h3>See also:</h3>
<ul>
<a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_inopts.html">curs_inopts(3x)</a>
</ul>
</dd>
<dt>
<a name = "resizeterm"></a>
<strong>resizeterm (nlines, ncols)</strong>
</dt>
<dd>
Change the terminal size.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">nlines</span>
<span class="types"><span class="type">int</span></span>
number of lines
</li>
<li><span class="parameter">ncols</span>
<span class="types"><span class="type">int</span></span>
number of columns
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
<code>true</code>, if successful
</ol>
<h3>Raises:</h3>
unimplemented
</dd>
<dt>
<a name = "ripoffline"></a>
<strong>ripoffline (top_line, callback)</strong>
</dt>
<dd>
Reduce the available size of the main screen.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">top_line</span>
<span class="types"><span class="type">bool</span></span>
</li>
<li><span class="parameter">callback</span>
<span class="types"><span class="type">func</span></span>
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
<code>true</code>, if successful
</ol>
<h3>See also:</h3>
<ul>
<a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_kernel.html">curs_kernel(3x)</a>
</ul>
</dd>
<dt>
<a name = "slk_attroff"></a>
<strong>slk_attroff (attrs)</strong>
</dt>
<dd>
Disable an attribute for soft labels.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">attrs</span>
<span class="types"><span class="type">int</span></span>
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
<code>true</code>, if successful
</ol>
<h3>See also:</h3>
<ul>
<a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_slk.html">curs_slk(3x)</a>
</ul>
</dd>
<dt>
<a name = "slk_attron"></a>
<strong>slk_attron (attrs)</strong>
</dt>
<dd>
Enable an attribute for soft labels.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">attrs</span>
<span class="types"><span class="type">int</span></span>
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
<code>true</code>, if successful
</ol>
<h3>See also:</h3>
<ul>
<a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_slk.html">curs_slk(3x)</a>
</ul>
</dd>
<dt>
<a name = "slk_attrset"></a>
<strong>slk_attrset (attrs)</strong>
</dt>
<dd>
Set the attributes for soft labels.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">attrs</span>
<span class="types"><span class="type">int</span></span>
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
<code>true</code>, if successful
</ol>
<h3>See also:</h3>
<ul>
<a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_slk.html">curs_slk(3x)</a>
</ul>
</dd>
<dt>
<a name = "slk_clear"></a>
<strong>slk_clear ()</strong>
</dt>
<dd>
Clears the soft labels from the screen.
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
<code>true</code>, if successful
</ol>
<h3>See also:</h3>
<ul>
<li><a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_slk.html">curs_slk(3x)</a></li>
<li><a href="../modules/posix.curses.html#slk_restore">slk_restore</a></li>
</ul>
</dd>
<dt>
<a name = "slk_init"></a>
<strong>slk_init (fmt)</strong>
</dt>
<dd>
Initialise the soft label keys area.
This must be called before <a href="../modules/posix.curses.html#initscr">initscr</a>.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">fmt</span>
<span class="types"><span class="type">int</span></span>
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
<code>true</code>, if successful
</ol>
<h3>See also:</h3>
<ul>
<a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_slk.html">curs_slk(3x)</a>
</ul>
</dd>
<dt>
<a name = "slk_label"></a>
<strong>slk_label (labnum)</strong>
</dt>
<dd>
Fetch the label for a soft label key.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">labnum</span>
<span class="types"><span class="type">int</span></span>
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="http://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
current label for <em>labnum</em>
</ol>
<h3>See also:</h3>
<ul>
<a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_slk.html">curs_slk(3x)</a>
</ul>
</dd>
<dt>
<a name = "slk_noutrefresh"></a>
<strong>slk_noutrefresh ()</strong>
</dt>
<dd>
Copy the soft label key area backing screen to the virtual screen.
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
<code>true</code>, if successful
</ol>
<h3>See also:</h3>
<ul>
<li><a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_slk.html">curs_slk(3x)</a></li>
<li><a href="../classes/posix.curses.window.html#posix.curses.window:refresh">posix.curses.window:refresh</a></li>
</ul>
</dd>
<dt>
<a name = "slk_refresh"></a>
<strong>slk_refresh ()</strong>
</dt>
<dd>
Refresh the soft label key area.
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
<code>true</code>, if successful
</ol>
<h3>See also:</h3>
<ul>
<li><a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_slk.html">curs_slk(3x)</a></li>
<li><a href="../classes/posix.curses.window.html#posix.curses.window:refresh">posix.curses.window:refresh</a></li>
</ul>
</dd>
<dt>
<a name = "slk_restore"></a>
<strong>slk_restore ()</strong>
</dt>
<dd>
Restores the soft labels to the screen.
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
<code>true</code>, if successful
</ol>
<h3>See also:</h3>
<ul>
<li><a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_slk.html">curs_slk(3x)</a></li>
<li><a href="../modules/posix.curses.html#slk_clear">slk_clear</a></li>
</ul>
</dd>
<dt>
<a name = "slk_set"></a>
<strong>slk_set (labnum, label, fmt)</strong>
</dt>
<dd>
Set the label for a soft label key.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">labnum</span>
<span class="types"><span class="type">int</span></span>
</li>
<li><span class="parameter">label</span>
<span class="types"><a class="type" href="http://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
</li>
<li><span class="parameter">fmt</span>
<span class="types"><span class="type">int</span></span>
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
<code>true</code>, if successful
</ol>
<h3>See also:</h3>
<ul>
<a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_slk.html">curs_slk(3x)</a>
</ul>
</dd>
<dt>
<a name = "slk_touch"></a>
<strong>slk_touch ()</strong>
</dt>
<dd>
Mark the soft label key area for refresh.
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
<code>true</code>, if successful
</ol>
<h3>See also:</h3>
<ul>
<a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_slk.html">curs_slk(3x)</a>
</ul>
</dd>
<dt>
<a name = "start_color"></a>
<strong>start_color ()</strong>
</dt>
<dd>
Initialise color output facility.
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
<code>true</code>, if successful
</ol>
<h3>See also:</h3>
<ul>
<li><a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_color.html">curs_color(3x)</a></li>
<li><a href="../modules/posix.curses.html#has_colors">has_colors</a></li>
</ul>
</dd>
<dt>
<a name = "stdscr"></a>
<strong>stdscr ()</strong>
</dt>
<dd>
Retern the main screen window.
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">window</span></span>
main screen
</ol>
<h3>See also:</h3>
<ul>
<a href="../modules/posix.curses.html#initscr">initscr</a>
</ul>
</dd>
<dt>
<a name = "termattrs"></a>
<strong>termattrs ([a])</strong>
</dt>
<dd>
Bitwise OR of all (or selected) video attributes supported by the terminal.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">a</span>
<span class="types"><span class="type">int</span></span>
terminal attribute bits
(<em>optional</em>)
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
<code>true</code>, if the terminal supports attribute <em>a</em>
</ol>
<h3>Or</h3>
<ol>
<span class="types"><span class="type">int</span></span>
bitarray of supported terminal attributes
</ol>
<h3>See also:</h3>
<ul>
<a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_termattrs.html">curs_termattrs(3x)</a>
</ul>
</dd>
<dt>
<a name = "termname"></a>
<strong>termname ()</strong>
</dt>
<dd>
Fetch the name of the terminal.
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="http://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
terminal name
</ol>
<h3>See also:</h3>
<ul>
<a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_termattrs.html">curs_termattrs(3x)</a>
</ul>
</dd>
<dt>
<a name = "tigetflag"></a>
<strong>tigetflag (capname)</strong>
</dt>
<dd>
Fetch terminfo boolean capability.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">capname</span>
<span class="types"><a class="type" href="http://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
content of terminal boolean capability
</ol>
<h3>See also:</h3>
<ul>
<li><a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_terminfo.html">curs_terminfo(3x)</a></li>
<li><a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/terminfo.html">terminfo(5)</a></li>
</ul>
</dd>
<dt>
<a name = "tigetnum"></a>
<strong>tigetnum (capname)</strong>
</dt>
<dd>
Fetch terminfo numeric capability.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">capname</span>
<span class="types"><a class="type" href="http://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">int</span></span>
content of terminal numeric capability
</ol>
<h3>See also:</h3>
<ul>
<li><a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_terminfo.html">curs_terminfo(3x)</a></li>
<li><a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/terminfo.html">terminfo(5)</a></li>
</ul>
</dd>
<dt>
<a name = "tigetstr"></a>
<strong>tigetstr (capname)</strong>
</dt>
<dd>
Fetch terminfo string capability.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">capname</span>
<span class="types"><a class="type" href="http://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="http://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
content of terminal string capability
</ol>
<h3>See also:</h3>
<ul>
<li><a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_terminfo.html">curs_terminfo(3x)</a></li>
<li><a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/terminfo.html">terminfo(5)</a></li>
</ul>
</dd>
<dt>
<a name = "unctrl"></a>
<strong>unctrl (c)</strong>
</dt>
<dd>
Return a printable representation of a character, ignoring attributes.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">c</span>
<span class="types"><span class="type">int</span></span>
character to act on
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="http://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
printable representation of <em>c</em>
</ol>
<h3>See also:</h3>
<ul>
<li><a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_util.html">curs_util(3x)</a></li>
<li><a href="../modules/posix.curses.html#keyname">keyname</a></li>
</ul>
</dd>
<dt>
<a name = "ungetch"></a>
<strong>ungetch (c)</strong>
</dt>
<dd>
Return a character to the keyboard input buffer.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">c</span>
<span class="types"><span class="type">int</span></span>
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
<code>true</code>, if successful
</ol>
<h3>See also:</h3>
<ul>
<li><a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/curs_getch.html">curs_getch(3x)</a></li>
<li><a href="../modules/posix.curses.html#flushinp">flushinp</a></li>
</ul>
</dd>
<dt>
<a name = "use_default_colors"></a>
<strong>use_default_colors ()</strong>
</dt>
<dd>
Reserve <code>-1</code> to represent terminal default colors.
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
<code>true</code>, if successful
</ol>
<h3>See also:</h3>
<ul>
<a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/default_colors.html">default_colors(3x)</a>
</ul>
</dd>
</dl>
<h2><a name="Constants"></a>Constants </h2>
<dl class="function">
<dt>
<a name = "posix.curses"></a>
<strong>posix.curses</strong>
</dt>
<dd>
Curses constants.
Any constants not available in the underlying system will be <code>nil</code> valued,
see <a href="../examples/curses.lua.html#">curses.lua</a>. Many of the <code>KEY_</code> constants cannot be generated by
modern keyboards and are mostly for historical compatibility with ancient
terminal hardware keyboards.</p>
<p>Note that, unlike the other posix submodules, almost all of these constants
remain undefined (<code>nil</code>) until after <a href="../modules/posix.curses.html#initscr">posix.curses.initscr</a> has returned
successfully.
<h3>Fields:</h3>
<ul>
<li><span class="parameter">ACS_BLOCK</span>
<span class="types"><span class="type">int</span></span>
alternate character set solid block
</li>
<li><span class="parameter">ACS_BOARD</span>
<span class="types"><span class="type">int</span></span>
alternate character set board of squares
</li>
<li><span class="parameter">ACS_BTEE</span>
<span class="types"><span class="type">int</span></span>
alternate character set bottom-tee
</li>
<li><span class="parameter">ACS_BULLET</span>
<span class="types"><span class="type">int</span></span>
alternate character set bullet
</li>
<li><span class="parameter">ACS_CKBOARD</span>
<span class="types"><span class="type">int</span></span>
alternate character set stipple
</li>
<li><span class="parameter">ACS_DARROW</span>
<span class="types"><span class="type">int</span></span>
alternate character set down arrow
</li>
<li><span class="parameter">ACS_DEGREE</span>
<span class="types"><span class="type">int</span></span>
alternate character set degrees mark
</li>
<li><span class="parameter">ACS_DIAMOND</span>
<span class="types"><span class="type">int</span></span>
alternate character set diamond
</li>
<li><span class="parameter">ACS_HLINE</span>
<span class="types"><span class="type">int</span></span>
alternate character set horizontal line
</li>
<li><span class="parameter">ACS_LANTERN</span>
<span class="types"><span class="type">int</span></span>
alternate character set lantern
</li>
<li><span class="parameter">ACS_LARROW</span>
<span class="types"><span class="type">int</span></span>
alternate character set left arrow
</li>
<li><span class="parameter">ACS_LLCORNER</span>
<span class="types"><span class="type">int</span></span>
alternate character set lower left corner
</li>
<li><span class="parameter">ACS_LRCORNER</span>
<span class="types"><span class="type">int</span></span>
alternate character set lower right corner
</li>
<li><span class="parameter">ACS_LTEE</span>
<span class="types"><span class="type">int</span></span>
alternate character set left tee
</li>
<li><span class="parameter">ACS_PLMINUS</span>
<span class="types"><span class="type">int</span></span>
alternate character set plus/minus
</li>
<li><span class="parameter">ACS_PLUS</span>
<span class="types"><span class="type">int</span></span>
alternate character set plus
</li>
<li><span class="parameter">ACS_RARROW</span>
<span class="types"><span class="type">int</span></span>
alternate character set right arrow
</li>
<li><span class="parameter">ACS_RTEE</span>
<span class="types"><span class="type">int</span></span>
alternate character set right tee
</li>
<li><span class="parameter">ACS_S1</span>
<span class="types"><span class="type">int</span></span>
alternate character set scan-line 1
</li>
<li><span class="parameter">ACS_S9</span>
<span class="types"><span class="type">int</span></span>
alternate character set scan-line 9
</li>
<li><span class="parameter">ACS_TTEE</span>
<span class="types"><span class="type">int</span></span>
alternate character set top tee
</li>
<li><span class="parameter">ACS_UARROW</span>
<span class="types"><span class="type">int</span></span>
alternate character set up arrow
</li>
<li><span class="parameter">ACS_ULCORNER</span>
<span class="types"><span class="type">int</span></span>
alternate character set upper left corner
</li>
<li><span class="parameter">ACS_URCORNER</span>
<span class="types"><span class="type">int</span></span>
alternate character set upper right corner
</li>
<li><span class="parameter">ACS_VLINE</span>
<span class="types"><span class="type">int</span></span>
alternate character set vertical line
</li>
<li><span class="parameter">A_ALTCHARSET</span>
<span class="types"><span class="type">int</span></span>
alternatate character set attribute
</li>
<li><span class="parameter">A_ATTRIBUTES</span>
<span class="types"><span class="type">int</span></span>
attributed character attributes bitmask
</li>
<li><span class="parameter">A_BLINK</span>
<span class="types"><span class="type">int</span></span>
blinking attribute
</li>
<li><span class="parameter">A_BOLD</span>
<span class="types"><span class="type">int</span></span>
bold attribute
</li>
<li><span class="parameter">A_CHARTEXT</span>
<span class="types"><span class="type">int</span></span>
attributed character text bitmask
</li>
<li><span class="parameter">A_COLOR</span>
<span class="types"><span class="type">int</span></span>
attributed character color-pair bitmask
</li>
<li><span class="parameter">A_DIM</span>
<span class="types"><span class="type">int</span></span>
half-bright attribute
</li>
<li><span class="parameter">A_INVIS</span>
<span class="types"><span class="type">int</span></span>
invisible attribute
</li>
<li><span class="parameter">A_NORMAL</span>
<span class="types"><span class="type">int</span></span>
normal attribute (all attributes off)
</li>
<li><span class="parameter">A_PROTECT</span>
<span class="types"><span class="type">int</span></span>
protected attribute
</li>
<li><span class="parameter">A_REVERSE</span>
<span class="types"><span class="type">int</span></span>
reverse video attribute
</li>
<li><span class="parameter">A_STANDOUT</span>
<span class="types"><span class="type">int</span></span>
standout attribute
</li>
<li><span class="parameter">A_UNDERLINE</span>
<span class="types"><span class="type">int</span></span>
underline attribute
</li>
<li><span class="parameter">COLOR_BLACK</span>
<span class="types"><span class="type">int</span></span>
black color attribute
</li>
<li><span class="parameter">COLOR_BLUE</span>
<span class="types"><span class="type">int</span></span>
blue color attribute
</li>
<li><span class="parameter">COLOR_CYAN</span>
<span class="types"><span class="type">int</span></span>
cyan color attribute
</li>
<li><span class="parameter">COLOR_GREEN</span>
<span class="types"><span class="type">int</span></span>
green color attribute
</li>
<li><span class="parameter">COLOR_MAGENTA</span>
<span class="types"><span class="type">int</span></span>
magenta color attribute
</li>
<li><span class="parameter">COLOR_RED</span>
<span class="types"><span class="type">int</span></span>
red color attribute
</li>
<li><span class="parameter">COLOR_WHITE</span>
<span class="types"><span class="type">int</span></span>
white color attribute
</li>
<li><span class="parameter">COLOR_YELLOW</span>
<span class="types"><span class="type">int</span></span>
yellow color attribute
</li>
<li><span class="parameter">KEY_A1</span>
<span class="types"><span class="type">int</span></span>
upper-left of keypad key
</li>
<li><span class="parameter">KEY_A3</span>
<span class="types"><span class="type">int</span></span>
upper-right of keypad key
</li>
<li><span class="parameter">KEY_B2</span>
<span class="types"><span class="type">int</span></span>
center of keypad key
</li>
<li><span class="parameter">KEY_BACKSPACE</span>
<span class="types"><span class="type">int</span></span>
backspace key
</li>
<li><span class="parameter">KEY_BEG</span>
<span class="types"><span class="type">int</span></span>
beginning key
</li>
<li><span class="parameter">KEY_BREAK</span>
<span class="types"><span class="type">int</span></span>
break key
</li>
<li><span class="parameter">KEY_BTAB</span>
<span class="types"><span class="type">int</span></span>
backtab key
</li>
<li><span class="parameter">KEY_C1</span>
<span class="types"><span class="type">int</span></span>
bottom-left of keypad key
</li>
<li><span class="parameter">KEY_C3</span>
<span class="types"><span class="type">int</span></span>
bottom-right of keypad key
</li>
<li><span class="parameter">KEY_CANCEL</span>
<span class="types"><span class="type">int</span></span>
cancel key
</li>
<li><span class="parameter">KEY_CATAB</span>
<span class="types"><span class="type">int</span></span>
clear all tabs key
</li>
<li><span class="parameter">KEY_CLEAR</span>
<span class="types"><span class="type">int</span></span>
clear screen key
</li>
<li><span class="parameter">KEY_CLOSE</span>
<span class="types"><span class="type">int</span></span>
close key
</li>
<li><span class="parameter">KEY_COMMAND</span>
<span class="types"><span class="type">int</span></span>
command key
</li>
<li><span class="parameter">KEY_COPY</span>
<span class="types"><span class="type">int</span></span>
copy key
</li>
<li><span class="parameter">KEY_CREATE</span>
<span class="types"><span class="type">int</span></span>
create key
</li>
<li><span class="parameter">KEY_CTAB</span>
<span class="types"><span class="type">int</span></span>
clear tab key
</li>
<li><span class="parameter">KEY_DC</span>
<span class="types"><span class="type">int</span></span>
delete character key
</li>
<li><span class="parameter">KEY_DL</span>
<span class="types"><span class="type">int</span></span>
delete line key
</li>
<li><span class="parameter">KEY_DOWN</span>
<span class="types"><span class="type">int</span></span>
down arrow key
</li>
<li><span class="parameter">KEY_EIC</span>
<span class="types"><span class="type">int</span></span>
exit insert char mode key
</li>
<li><span class="parameter">KEY_END</span>
<span class="types"><span class="type">int</span></span>
end key
</li>
<li><span class="parameter">KEY_ENTER</span>
<span class="types"><span class="type">int</span></span>
enter key
</li>
<li><span class="parameter">KEY_EOL</span>
<span class="types"><span class="type">int</span></span>
clear to end of line key
</li>
<li><span class="parameter">KEY_EOS</span>
<span class="types"><span class="type">int</span></span>
clear to end of screen key
</li>
<li><span class="parameter">KEY_EXIT</span>
<span class="types"><span class="type">int</span></span>
exit key
</li>
<li><span class="parameter">KEY_F0</span>
<span class="types"><span class="type">int</span></span>
f0 key
</li>
<li><span class="parameter">KEY_F1</span>
<span class="types"><span class="type">int</span></span>
f1 key
</li>
<li><span class="parameter">KEY_F2</span>
<span class="types"><span class="type">int</span></span>
f2 key
</li>
<li><span class="parameter">KEY_F3</span>
<span class="types"><span class="type">int</span></span>
f3 key
</li>
<li><span class="parameter">KEY_F4</span>
<span class="types"><span class="type">int</span></span>
f4 key
</li>
<li><span class="parameter">KEY_F5</span>
<span class="types"><span class="type">int</span></span>
f5 key
</li>
<li><span class="parameter">KEY_F6</span>
<span class="types"><span class="type">int</span></span>
f6 key
</li>
<li><span class="parameter">KEY_F7</span>
<span class="types"><span class="type">int</span></span>
f7 key
</li>
<li><span class="parameter">KEY_F8</span>
<span class="types"><span class="type">int</span></span>
f8 key
</li>
<li><span class="parameter">KEY_F9</span>
<span class="types"><span class="type">int</span></span>
f9 key
</li>
<li><span class="parameter">KEY_F10</span>
<span class="types"><span class="type">int</span></span>
f10 key
</li>
<li><span class="parameter">KEY_F11</span>
<span class="types"><span class="type">int</span></span>
f11 key
</li>
<li><span class="parameter">KEY_F12</span>
<span class="types"><span class="type">int</span></span>
f12 key
</li>
<li><span class="parameter">KEY_F13</span>
<span class="types"><span class="type">int</span></span>
f13 key
</li>
<li><span class="parameter">KEY_F14</span>
<span class="types"><span class="type">int</span></span>
f14 key
</li>
<li><span class="parameter">KEY_F15</span>
<span class="types"><span class="type">int</span></span>
f15 key
</li>
<li><span class="parameter">KEY_F16</span>
<span class="types"><span class="type">int</span></span>
f16 key
</li>
<li><span class="parameter">KEY_F17</span>
<span class="types"><span class="type">int</span></span>
f17 key
</li>
<li><span class="parameter">KEY_F18</span>
<span class="types"><span class="type">int</span></span>
f18 key
</li>
<li><span class="parameter">KEY_F19</span>
<span class="types"><span class="type">int</span></span>
f19 key
</li>
<li><span class="parameter">KEY_F20</span>
<span class="types"><span class="type">int</span></span>
f20 key
</li>
<li><span class="parameter">KEY_F21</span>
<span class="types"><span class="type">int</span></span>
f21 key
</li>
<li><span class="parameter">KEY_F22</span>
<span class="types"><span class="type">int</span></span>
f22 key
</li>
<li><span class="parameter">KEY_F23</span>
<span class="types"><span class="type">int</span></span>
f23 key
</li>
<li><span class="parameter">KEY_F24</span>
<span class="types"><span class="type">int</span></span>
f24 key
</li>
<li><span class="parameter">KEY_F25</span>
<span class="types"><span class="type">int</span></span>
f25 key
</li>
<li><span class="parameter">KEY_F26</span>
<span class="types"><span class="type">int</span></span>
f26 key
</li>
<li><span class="parameter">KEY_F27</span>
<span class="types"><span class="type">int</span></span>
f27 key
</li>
<li><span class="parameter">KEY_F28</span>
<span class="types"><span class="type">int</span></span>
f28 key
</li>
<li><span class="parameter">KEY_F29</span>
<span class="types"><span class="type">int</span></span>
f29 key
</li>
<li><span class="parameter">KEY_F30</span>
<span class="types"><span class="type">int</span></span>
f30 key
</li>
<li><span class="parameter">KEY_F31</span>
<span class="types"><span class="type">int</span></span>
f31 key
</li>
<li><span class="parameter">KEY_F32</span>
<span class="types"><span class="type">int</span></span>
f32 key
</li>
<li><span class="parameter">KEY_F33</span>
<span class="types"><span class="type">int</span></span>
f33 key
</li>
<li><span class="parameter">KEY_F34</span>
<span class="types"><span class="type">int</span></span>
f34 key
</li>
<li><span class="parameter">KEY_F35</span>
<span class="types"><span class="type">int</span></span>
f35 key
</li>
<li><span class="parameter">KEY_F36</span>
<span class="types"><span class="type">int</span></span>
f36 key
</li>
<li><span class="parameter">KEY_F37</span>
<span class="types"><span class="type">int</span></span>
f37 key
</li>
<li><span class="parameter">KEY_F38</span>
<span class="types"><span class="type">int</span></span>
f38 key
</li>
<li><span class="parameter">KEY_F39</span>
<span class="types"><span class="type">int</span></span>
f39 key
</li>
<li><span class="parameter">KEY_F40</span>
<span class="types"><span class="type">int</span></span>
f40 key
</li>
<li><span class="parameter">KEY_F41</span>
<span class="types"><span class="type">int</span></span>
f41 key
</li>
<li><span class="parameter">KEY_F42</span>
<span class="types"><span class="type">int</span></span>
f42 key
</li>
<li><span class="parameter">KEY_F43</span>
<span class="types"><span class="type">int</span></span>
f43 key
</li>
<li><span class="parameter">KEY_F44</span>
<span class="types"><span class="type">int</span></span>
f44 key
</li>
<li><span class="parameter">KEY_F45</span>
<span class="types"><span class="type">int</span></span>
f45 key
</li>
<li><span class="parameter">KEY_F46</span>
<span class="types"><span class="type">int</span></span>
f46 key
</li>
<li><span class="parameter">KEY_F47</span>
<span class="types"><span class="type">int</span></span>
f47 key
</li>
<li><span class="parameter">KEY_F48</span>
<span class="types"><span class="type">int</span></span>
f48 key
</li>
<li><span class="parameter">KEY_F49</span>
<span class="types"><span class="type">int</span></span>
f49 key
</li>
<li><span class="parameter">KEY_F50</span>
<span class="types"><span class="type">int</span></span>
f50 key
</li>
<li><span class="parameter">KEY_F51</span>
<span class="types"><span class="type">int</span></span>
f51 key
</li>
<li><span class="parameter">KEY_F52</span>
<span class="types"><span class="type">int</span></span>
f52 key
</li>
<li><span class="parameter">KEY_F53</span>
<span class="types"><span class="type">int</span></span>
f53 key
</li>
<li><span class="parameter">KEY_F54</span>
<span class="types"><span class="type">int</span></span>
f54 key
</li>
<li><span class="parameter">KEY_F55</span>
<span class="types"><span class="type">int</span></span>
f55 key
</li>
<li><span class="parameter">KEY_F56</span>
<span class="types"><span class="type">int</span></span>
f56 key
</li>
<li><span class="parameter">KEY_F57</span>
<span class="types"><span class="type">int</span></span>
f57 key
</li>
<li><span class="parameter">KEY_F58</span>
<span class="types"><span class="type">int</span></span>
f58 key
</li>
<li><span class="parameter">KEY_F59</span>
<span class="types"><span class="type">int</span></span>
f59 key
</li>
<li><span class="parameter">KEY_F60</span>
<span class="types"><span class="type">int</span></span>
f60 key
</li>
<li><span class="parameter">KEY_F61</span>
<span class="types"><span class="type">int</span></span>
f61 key
</li>
<li><span class="parameter">KEY_F62</span>
<span class="types"><span class="type">int</span></span>
f62 key
</li>
<li><span class="parameter">KEY_F63</span>
<span class="types"><span class="type">int</span></span>
f63 key
</li>
<li><span class="parameter">KEY_FIND</span>
<span class="types"><span class="type">int</span></span>
find key
</li>
<li><span class="parameter">KEY_HELP</span>
<span class="types"><span class="type">int</span></span>
help key
</li>
<li><span class="parameter">KEY_HOME</span>
<span class="types"><span class="type">int</span></span>
home key
</li>
<li><span class="parameter">KEY_IC</span>
<span class="types"><span class="type">int</span></span>
enter insert char mode key
</li>
<li><span class="parameter">KEY_IL</span>
<span class="types"><span class="type">int</span></span>
insert line key
</li>
<li><span class="parameter">KEY_LEFT</span>
<span class="types"><span class="type">int</span></span>
cursor left key
</li>
<li><span class="parameter">KEY_LL</span>
<span class="types"><span class="type">int</span></span>
home down or bottom key
</li>
<li><span class="parameter">KEY_MARK</span>
<span class="types"><span class="type">int</span></span>
mark key
</li>
<li><span class="parameter">KEY_MESSAGE</span>
<span class="types"><span class="type">int</span></span>
message key
</li>
<li><span class="parameter">KEY_MOUSE</span>
<span class="types"><span class="type">int</span></span>
mouse event available virtual key
</li>
<li><span class="parameter">KEY_MOVE</span>
<span class="types"><span class="type">int</span></span>
move key
</li>
<li><span class="parameter">KEY_NEXT</span>
<span class="types"><span class="type">int</span></span>
next object key
</li>
<li><span class="parameter">KEY_NPAGE</span>
<span class="types"><span class="type">int</span></span>
next page key
</li>
<li><span class="parameter">KEY_OPEN</span>
<span class="types"><span class="type">int</span></span>
open key
</li>
<li><span class="parameter">KEY_OPTIONS</span>
<span class="types"><span class="type">int</span></span>
options key
</li>
<li><span class="parameter">KEY_PPAGE</span>
<span class="types"><span class="type">int</span></span>
previous page key
</li>
<li><span class="parameter">KEY_PREVIOUS</span>
<span class="types"><span class="type">int</span></span>
prewious object key
</li>
<li><span class="parameter">KEY_PRINT</span>
<span class="types"><span class="type">int</span></span>
print key
</li>
<li><span class="parameter">KEY_REDO</span>
<span class="types"><span class="type">int</span></span>
redo key
</li>
<li><span class="parameter">KEY_REFERENCE</span>
<span class="types"><span class="type">int</span></span>
reference key
</li>
<li><span class="parameter">KEY_REFRESH</span>
<span class="types"><span class="type">int</span></span>
refresh key
</li>
<li><span class="parameter">KEY_REPLACE</span>
<span class="types"><span class="type">int</span></span>
replace key
</li>
<li><span class="parameter">KEY_RESET</span>
<span class="types"><span class="type">int</span></span>
hard reset key
</li>
<li><span class="parameter">KEY_RESIZE</span>
<span class="types"><span class="type">int</span></span>
resize event virtual key
</li>
<li><span class="parameter">KEY_RESTART</span>
<span class="types"><span class="type">int</span></span>
restart key
</li>
<li><span class="parameter">KEY_RESUME</span>
<span class="types"><span class="type">int</span></span>
resume key
</li>
<li><span class="parameter">KEY_RIGHT</span>
<span class="types"><span class="type">int</span></span>
cursor right key
</li>
<li><span class="parameter">KEY_SAVE</span>
<span class="types"><span class="type">int</span></span>
save key
</li>
<li><span class="parameter">KEY_SBEG</span>
<span class="types"><span class="type">int</span></span>
shift beginning key
</li>
<li><span class="parameter">KEY_SCANCEL</span>
<span class="types"><span class="type">int</span></span>
shift cancel key
</li>
<li><span class="parameter">KEY_SCOMMAND</span>
<span class="types"><span class="type">int</span></span>
shift command key
</li>
<li><span class="parameter">KEY_SCOPY</span>
<span class="types"><span class="type">int</span></span>
shift copy key
</li>
<li><span class="parameter">KEY_SCREATE</span>
<span class="types"><span class="type">int</span></span>
shift create key
</li>
<li><span class="parameter">KEY_SDC</span>
<span class="types"><span class="type">int</span></span>
shift delete character key
</li>
<li><span class="parameter">KEY_SDL</span>
<span class="types"><span class="type">int</span></span>
shift delete line key
</li>
<li><span class="parameter">KEY_SELECT</span>
<span class="types"><span class="type">int</span></span>
select key
</li>
<li><span class="parameter">KEY_SEND</span>
<span class="types"><span class="type">int</span></span>
send key
</li>
<li><span class="parameter">KEY_SEOL</span>
<span class="types"><span class="type">int</span></span>
shift clear to end of line key
</li>
<li><span class="parameter">KEY_SEXIT</span>
<span class="types"><span class="type">int</span></span>
shift exit key
</li>
<li><span class="parameter">KEY_SF</span>
<span class="types"><span class="type">int</span></span>
scroll one line forward key
</li>
<li><span class="parameter">KEY_SFIND</span>
<span class="types"><span class="type">int</span></span>
shift find key
</li>
<li><span class="parameter">KEY_SHELP</span>
<span class="types"><span class="type">int</span></span>
shift help key
</li>
<li><span class="parameter">KEY_SHOME</span>
<span class="types"><span class="type">int</span></span>
shift home key
</li>
<li><span class="parameter">KEY_SIC</span>
<span class="types"><span class="type">int</span></span>
shift enter insert mode key
</li>
<li><span class="parameter">KEY_SLEFT</span>
<span class="types"><span class="type">int</span></span>
shift cursor left key
</li>
<li><span class="parameter">KEY_SMESSAGE</span>
<span class="types"><span class="type">int</span></span>
shift message key
</li>
<li><span class="parameter">KEY_SMOVE</span>
<span class="types"><span class="type">int</span></span>
shift move key
</li>
<li><span class="parameter">KEY_SNEXT</span>
<span class="types"><span class="type">int</span></span>
shift next object key
</li>
<li><span class="parameter">KEY_SOPTIONS</span>
<span class="types"><span class="type">int</span></span>
shift options key
</li>
<li><span class="parameter">KEY_SPREVIOUS</span>
<span class="types"><span class="type">int</span></span>
shift previous object key
</li>
<li><span class="parameter">KEY_SPRINT</span>
<span class="types"><span class="type">int</span></span>
shift print key
</li>
<li><span class="parameter">KEY_SR</span>
<span class="types"><span class="type">int</span></span>
scroll one line backward key
</li>
<li><span class="parameter">KEY_SREDO</span>
<span class="types"><span class="type">int</span></span>
shift redo key
</li>
<li><span class="parameter">KEY_SREPLACE</span>
<span class="types"><span class="type">int</span></span>
shift replace key
</li>
<li><span class="parameter">KEY_SRESET</span>
<span class="types"><span class="type">int</span></span>
soft reset key
</li>
<li><span class="parameter">KEY_SRIGHT</span>
<span class="types"><span class="type">int</span></span>
shift cursor right key
</li>
<li><span class="parameter">KEY_SRSUME</span>
<span class="types"><span class="type">int</span></span>
shift resume key
</li>
<li><span class="parameter">KEY_SSAVE</span>
<span class="types"><span class="type">int</span></span>
shift save key
</li>
<li><span class="parameter">KEY_SSUSPEND</span>
<span class="types"><span class="type">int</span></span>
shift suspend key
</li>
<li><span class="parameter">KEY_STAB</span>
<span class="types"><span class="type">int</span></span>
shift tab key
</li>
<li><span class="parameter">KEY_SUNDO</span>
<span class="types"><span class="type">int</span></span>
shift undo key
</li>
<li><span class="parameter">KEY_SUSPEND</span>
<span class="types"><span class="type">int</span></span>
suspend key
</li>
<li><span class="parameter">KEY_UNDO</span>
<span class="types"><span class="type">int</span></span>
undo key
</li>
<li><span class="parameter">KEY_UP</span>
<span class="types"><span class="type">int</span></span>
cursor up key
</li>
</ul>
<h3>Usage:</h3>
<ul>
<pre class="example">
<span class="comment">-- Print curses constants supported on this host.
</span> <span class="keyword">for</span> name, value <span class="keyword">in</span> <span class="global">pairs</span> (<span class="global">require</span> <span class="string">"posix.curses"</span>) <span class="keyword">do</span>
<span class="keyword">if</span> <span class="global">type</span> (value) == <span class="string">"number"</span> <span class="keyword">then</span>
<span class="global">print</span> (name, value)
<span class="keyword">end</span>
<span class="keyword">end</span></pre>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
<i style="float:right;">Last updated 2015-03-01 09:06:02 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>