aboutsummaryrefslogtreecommitdiff
path: root/termkey_keyname2sym.3
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2011-04-01 13:26:54 +0100
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2011-04-01 13:26:54 +0100
commitdbb13defb7ab00b1f4e801f3daab7dd1a3744ac0 (patch)
tree4d7bd461bcc48380b3c353ac7b7cec2ed22d313b /termkey_keyname2sym.3
parent6adb2324f5568c3045e97c1712a1bc6e3f9220cc (diff)
downloadtermo-dbb13defb7ab00b1f4e801f3daab7dd1a3744ac0.tar.gz
termo-dbb13defb7ab00b1f4e801f3daab7dd1a3744ac0.tar.xz
termo-dbb13defb7ab00b1f4e801f3daab7dd1a3744ac0.zip
Provide a termkey_lookup_keyname that can do partial buffer parsing
Diffstat (limited to 'termkey_keyname2sym.3')
-rw-r--r--termkey_keyname2sym.36
1 files changed, 3 insertions, 3 deletions
diff --git a/termkey_keyname2sym.3 b/termkey_keyname2sym.3
index 89c4c80..c9224bc 100644
--- a/termkey_keyname2sym.3
+++ b/termkey_keyname2sym.3
@@ -10,13 +10,13 @@ termkey_keyname2sym \- look up a symbolic key value for a string name
.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).
+\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), and is a more specific form of \fBtermkey_lookup_keyname\fP(3) which only recognises names as complete strings.
.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.
+\fBtermkey_keyname2sym\fP() returns a symbolic key constant, or \fBTERMKEY_SYM_UNKNOWN\fP.
.SH "SEE ALSO"
.BR termkey_new (3),
.BR termkey_get_keyname (3),
-.BR termkey_strfkey (3),
+.BR termkey_lookup_keyname (3),
.BR termkey_strpkey (3)