# keybound 3x 2024-12-28 ncurses 6.6 Library calls

    keybound(3x)                     Library calls                    keybound(3x)

## NAME

           keybound - get definition of a curses function key code

## SYNOPSIS

           #include <curses.h>

           char * keybound(int key-code, int count);

## DESCRIPTION

           The  keybound  ncurses extension permits a curses application to obtain
           the value of the  string  bound  to  the  function  key  key-code;  see
           wgetch(3x)  (wide-character API users: wget_wch(3x)).  By default, such
           bindings are string  capabilities  from  the  terminfo  database  entry
           corresponding   to   the  terminal  type.   The  application  can  non-
           destructively   and   repeatedly   override   such   definitions   with
           define_key(3x),  as  if  by  pushing new definitions onto a stack.  The
           count parameter accesses the  nth  most  recently  defined  binding;  0
           selects the binding that is used on input.

## RETURN VALUE

           If key-code corresponds to a function key defined by the application or
           the  terminal type in use, keybound allocates and returns a string that
           must be freed by the application.  keybound returns NULL if key-code is
           not positive or if it does not correspond to a key code definition.

## EXTENSIONS

           keybound 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), keyok(3x), key_defined(3x), terminfo(5)

    ncurses 6.6                       2024-12-28                      keybound(3x)