1 .\"***************************************************************************
2 .\" Copyright 2018-2023,2024 Thomas E. Dickey *
3 .\" Copyright 1999-2008,2010 Free Software Foundation, Inc. *
5 .\" Permission is hereby granted, free of charge, to any person obtaining a *
6 .\" copy of this software and associated documentation files (the *
7 .\" "Software"), to deal in the Software without restriction, including *
8 .\" without limitation the rights to use, copy, modify, merge, publish, *
9 .\" distribute, distribute with modifications, sublicense, and/or sell *
10 .\" copies of the Software, and to permit persons to whom the Software is *
11 .\" furnished to do so, subject to the following conditions: *
13 .\" The above copyright notice and this permission notice shall be included *
14 .\" in all copies or substantial portions of the Software. *
16 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
17 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
18 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
19 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
20 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
21 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
22 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
24 .\" Except as contained in this notice, the name(s) of the above copyright *
25 .\" holders shall not be used in advertising or otherwise to promote the *
26 .\" sale, use or other dealings in this Software without prior written *
28 .\"***************************************************************************
30 .\" Author: Thomas E. Dickey 1999
32 .\" $Id: keybound.3x,v 1.38 2024/05/18 20:05:36 tom Exp $
33 .TH keybound 3X 2024-05-18 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls"
36 get definition of a \fIcurses\fP function key code
39 \fB#include <curses.h>
41 \fBchar * keybound(int \fIkey-code\fP, int \fIcount\fP);
49 application to obtain the value of the string
53 see \fB\%wgetch\fP(3X)
54 (wide-character API users: \fB\%wget_wch\fP(3X)).
56 such bindings are string capabilities from the
58 database entry corresponding to the terminal type.
59 The application can non-destructively and repeatedly
60 override such definitions with
61 \fB\%define_key\fP(3X),
62 as if by pushing new definitions onto a stack.
65 parameter accesses the
67 most recently defined binding;
69 selects the binding that is used on input.
73 corresponds to a function key defined
75 or the terminal type in use,
77 allocates and returns a string
78 that must be freed by the application.
85 or if it does not correspond to a key code definition.
92 Applications employing
94 extensions should condition their use on the visibility of the
101 \fB\%define_key\fP(3X),
102 \fB\%key_defined\fP(3X),