]> ncurses.scripts.mit.edu Git - ncurses.git/blob - doc/html/man/define_key.3x.html
ncurses 5.1
[ncurses.git] / doc / html / man / define_key.3x.html
1 <HTML>
2 <BODY>
3 <PRE>
4 <!-- Manpage converted by man2html 3.0.1 -->
5
6 </PRE>
7 <H2>NAME</H2><PRE>
8        <B>define_key</B> - define a keycode
9
10
11 </PRE>
12 <H2>SYNOPSIS</H2><PRE>
13        <B>#include</B> <B>&lt;curses.h&gt;</B>
14
15        <B>int</B> <B>define_key(char</B> <B>*definition,</B> <B>int</B> <B>keycode);</B>
16
17
18 </PRE>
19 <H2>DESCRIPTION</H2><PRE>
20        This is an extension to the curses library.  It permits an
21        application to define keycodes  with  their  corresponding
22        control  strings,  so that the ncurses library will inter-
23        pret them just as it would the  predefined  codes  in  the
24        terminfo database.
25
26        If  the  given string is null, any existing definition for
27        the keycode is removed.  Similarly, if the  given  keycode
28        is  negative  or  zero,  any existing string for the given
29        definition is removed.
30
31
32 </PRE>
33 <H2>RETURN VALUE</H2><PRE>
34        The keycode  must  be  greater  than  zero,  else  ERR  is
35        returned.
36
37
38 </PRE>
39 <H2>PORTABILITY</H2><PRE>
40        These  routines  are  specific  to ncurses.  They were not
41        supported on Version 7, BSD or System  V  implementations.
42        It  is recommended that any code depending on them be con-
43        ditioned using NCURSES_VERSION.
44
45
46 </PRE>
47 <H2>SEE ALSO</H2><PRE>
48        <B><A HREF="keyok.3x.html">keyok(3x)</A></B>.
49
50
51 </PRE>
52 <H2>AUTHOR</H2><PRE>
53        Thomas Dickey.
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73 </PRE>
74 <HR>
75 <ADDRESS>
76 Man(1) output converted with
77 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
78 </ADDRESS>
79 </BODY>
80 </HTML>