1define_key(3X)                                                  define_key(3X)
2
3
4

NAME

6       define_key - define a keycode
7

SYNOPSIS

9       #include <curses.h>
10
11       int define_key(const char *definition, int keycode);
12

DESCRIPTION

14       This  is an extension to the curses library.  It permits an application
15       to define keycodes with their corresponding control  strings,  so  that
16       the ncurses library will interpret them just as it would the predefined
17       codes in the terminfo database.
18
19       If the given string is null, any existing definition for the keycode is
20       removed.   Similarly,  if  the  given  keycode is negative or zero, any
21       existing string for the given definition is removed.
22

RETURN VALUE

24       The keycode must be greater than zero, else ERR is returned.
25

PORTABILITY

27       These routines are specific to ncurses.  They  were  not  supported  on
28       Version 7, BSD or System V implementations.  It is recommended that any
29       code depending on them be conditioned using NCURSES_VERSION.
30

SEE ALSO

32       keyok(3X), key_defined(3X).
33

AUTHOR

35       Thomas Dickey.
36
37
38
39                                                                define_key(3X)
Impressum