blob: 9aa72bec5b43556b49c80c84c81a3c43bcf4023e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
.TH TERMKEY_KEYNAME2SYM 3
.SH NAME
termkey_keyname2sym \- look up a symbolic key value for a string name
.SH SYNOPSIS
.nf
.B #include <termkey.h>
.sp
.BI "TermKeySym termkey_keyname2sym(TermKey *" tk ", const char *" keyname );
.fi
.sp
Link with \fI-ltermkey\fP.
.SH DESCRIPTION
\fBtermkey_keyname2sym\fP looks up the symbolic key value represented by the given string name. This is a case-sensitive comparison. If the given name is not found, \fBTERMKEY_SYM_UNKNOWN\fP is returned instead. This function is the inverse of \fBtermkey_get_keyname\fP(3).
.PP
Because the key names are stored in an array indexed by the symbol number, this function has to perform a linear search of the names. Use of this function should be restricted to converting key names into symbolic values during a program's initialisation, so that efficient comparisons can be done while it is running.
.SH "RETURN VALUE"
\fBtermkey_get_key\fP() returns a pointer to a string.
.SH "SEE ALSO"
.BR termkey_new (3),
.BR termkey_get_keyname (3),
.BR termkey_snprint_key (3)
|