aboutsummaryrefslogtreecommitdiff
path: root/man/termkey_keyname2sym.3
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2012-01-18 12:01:38 +0000
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2012-01-18 12:01:38 +0000
commit082b49f0f8790e2cf98346a03c53f492d9d5dcba (patch)
tree91d657db23e92b6b658dd4e73cecf1fb18c79188 /man/termkey_keyname2sym.3
parentd64ba87edae62894ca74cfb9d6d8cdd88c213397 (diff)
downloadtermo-082b49f0f8790e2cf98346a03c53f492d9d5dcba.tar.gz
termo-082b49f0f8790e2cf98346a03c53f492d9d5dcba.tar.xz
termo-082b49f0f8790e2cf98346a03c53f492d9d5dcba.zip
Move the growing collection of manpages into their own man/ subdirectory
Diffstat (limited to 'man/termkey_keyname2sym.3')
-rw-r--r--man/termkey_keyname2sym.322
1 files changed, 22 insertions, 0 deletions
diff --git a/man/termkey_keyname2sym.3 b/man/termkey_keyname2sym.3
new file mode 100644
index 0000000..095a465
--- /dev/null
+++ b/man/termkey_keyname2sym.3
@@ -0,0 +1,22 @@
+.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), 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_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_lookup_keyname (3),
+.BR termkey_strpkey (3)