Man page - termkey_lookup_keyname(3)
Packages contas this manual
- termkey_get_fd(3)
- termkey_canonicalise(3)
- termkey_new(3)
- termkey_set_buffer_size(3)
- termkey_interpret_mouse(3)
- termkey_waitkey(3)
- termkey_start(3)
- termkey_strpkey(3)
- termkey_strfkey(3)
- termkey_lookup_keyname(3)
- termkey_interpret_modereport(3)
- termkey(7)
- termkey_advisereadable(3)
- termkey_set_flags(3)
- termkey_get_buffer_remaining(3)
- termkey_keyname2sym(3)
- termkey_getkey(3)
- termkey_interpret_string(3)
- termkey_set_canonflags(3)
- termkey_set_waittime(3)
- termkey_interpret_position(3)
- termkey_get_keyname(3)
- termkey_interpret_csi(3)
- termkey_keycmp(3)
- termkey_push_bytes(3)
apt-get install libtermkey-dev
Manual
| TERMKEY_LOOKUP_KEYNAME(3) | Library Functions Manual | TERMKEY_LOOKUP_KEYNAME(3) |
NAME
termkey_lookup_keyname - look up a symbolic key value for a string name
SYNOPSIS
#include <termkey.h>
char *termkey_lookup_keyname(TermKey *tk, const char *keyname,
TermKeySym *sym);
Link with -ltermkey.
DESCRIPTION
termkey_lookup_keyname() looks up the symbolic key value represented by the given string name. This is a case-sensitive comparison. The symbolic value is written to the variable addressed by sym. This function is a more general form of termkey_keyname2sym(3) because it can recognise a symbolic key name within a longer string, returning a pointer to the remainder of the input after the key name.
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.
RETURN VALUE
termkey_lookup_keyname() returns a pointer to the first character after a recognised name, or NULL if the string does not begin with the name of a recognised symbolic key.
SEE ALSO
termkey_get_keyname(3), termkey_keyname2sym(3), termkey_strpkey(3), termkey(7)