4 <STRONG>define_key</STRONG> - define a keycode
9 <STRONG>#include</STRONG> <STRONG><curses.h></STRONG>
11 <STRONG>int</STRONG> <STRONG>define_key(char</STRONG> <STRONG>*definition,</STRONG> <STRONG>int</STRONG> <STRONG>keycode);</STRONG>
15 <H2>DESCRIPTION</H2><PRE>
16 This is an extension to the curses library. It permits an
17 application to define keycodes with their corresponding
18 control strings, so that the ncurses library will inter-
19 pret them just as it would the predefined codes in the
22 If the given string is null, any existing definition for
23 the keycode is removed. Similarly, if the given keycode
24 is negative or zero, any existing string for the given
25 definition is removed.
29 <H2>RETURN VALUE</H2><PRE>
30 The keycode must be greater than zero, else ERR is
35 <H2>PORTABILITY</H2><PRE>
36 These routines are specific to ncurses. They were not
37 supported on Version 7, BSD or System V implementations.
38 It is recommended that any code depending on them be con-
39 ditioned using NCURSES_VERSION.
43 <H2>SEE ALSO</H2><PRE>
44 <STRONG><A HREF="keyok.3x.html">keyok(3X)</A></STRONG>.