key_defined - test whether a curses function key code is defined
Contents
Description
The key_definedncurses extension permits a curses application to determine the function key code, if
any, to which the string definition is bound.
Extensions
define_key is an ncurses extension.
Name
key_defined - test whether a curses function key code is defined
Portability
Applications employing ncurses extensions should condition their use on the visibility of the
NCURSES_VERSION preprocessor macro.
Return Value
key_defined returns the first key code to which definition is bound if any exists. If none does, it
returns 0. If definition is a prefix of another binding, key_defined returns -1.
See Also
ncurses(3NCURSES), define_key(3NCURSES), keybound(3NCURSES), keyok(3NCURSES) ncurses 6.5 2024-06-08 key_defined(3NCURSES)
Synopsis
#include<curses.h>intkey_defined(constchar*definition);
