|
NAME | SYNOPSIS | DESCRIPTION | RETURN VALUE | EXTENSIONS | PORTABILITY | AUTHORS | SEE ALSO | COLOPHON |
|
|
|
keybound(3X) Library calls keybound(3X)
keybound - get definition of a curses function key code
#include <curses.h>
char * keybound(int key-code, int count);
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.
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.
keybound is an ncurses extension.
Applications employing ncurses extensions should condition their
use on the visibility of the NCURSES_VERSION preprocessor macro.
Thomas Dickey
curses(3X), define_key(3X), keyok(3X), key_defined(3X),
terminfo(5)
This page is part of the ncurses (new curses) project.
Information about the project can be found at
⟨https://invisible-island.net/ncurses/ncurses.html⟩. If you have a
bug report for this manual page, send it to bug-ncurses@gnu.org.
This page was obtained from the tarball ncurses-6.6.tar.gz fetched
from ⟨https://ftp.gnu.org/gnu/ncurses/⟩ on 2026-01-16. If you
discover any rendering problems in this HTML version of the page,
or you believe there is a better or more up-to-date source for the
page, or you have corrections or improvements to the information
in this COLOPHON (which is not part of the original manual page),
send a mail to man-pages@man7.org
ncurses @NCURSES_MAJOR@.@NCU... 2024-12-28 keybound(3X)