key_defined.3x - Man Page
test whether a curses function key code is defined
Synopsis
#include <curses.h> int key_defined(const char * definition);
Description
The key_defined ncurses extension permits a curses application to determine the function key code, if any, to which the string definition is bound.
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.
Extensions
define_key is an ncurses extension.
Portability
Applications employing ncurses extensions should condition their use on the visibility of the NCURSES_VERSION preprocessor macro.
Authors
Thomas Dickey
See Also
curses(3X), define_key(3X), keybound(3X), keyok(3X)
Info
2024-06-08 ncurses 6.5 Library calls