key_defined(3ncurses)

key_defined3ncurses

Test whether a curses function key code is defined

Usage

#include <curses.h>

int key_defined(const char * definition);

Overview

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.

Releases

11 releases since Debian 3.1 (Sarge); the text changed 6 times.

  1. 3.1
  2. 4.0–6.0
  3. 7–9
  4. 10
  5. 11
  6. 12
  7. 13

Authors

Thomas Dickey

From ncurses-doc 6.5+20250216-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.