1TERMKEY_LOOKUP_KEYNAME(3)  Library Functions Manual  TERMKEY_LOOKUP_KEYNAME(3)
2
3
4

NAME

6       termkey_lookup_keyname - look up a symbolic key value for a string name
7

SYNOPSIS

9       #include <termkey.h>
10
11       char *termkey_lookup_keyname(TermKey *tk, const char *keyname,
12                  TermKeySym *sym);
13
14       Link with -ltermkey.
15

DESCRIPTION

17       termkey_lookup_keyname() looks up the symbolic key value represented by
18       the given string name. This is a case-sensitive  comparison.  The  sym‐
19       bolic  value is written to the variable addressed by sym. This function
20       is a more general form of termkey_keyname2sym(3) because it can  recog‐
21       nise a symbolic key name within a longer string, returning a pointer to
22       the remainder of the input after the key name.
23
24       Because the key names are stored in an array indexed by the symbol num‐
25       ber,  this function has to perform a linear search of the names. Use of
26       this function should be restricted to converting key  names  into  sym‐
27       bolic  values during a program's initialisation, so that efficient com‐
28       parisons can be done while it is running.
29

RETURN VALUE

31       termkey_lookup_keyname() returns a pointer to the first character after
32       a  recognised  name, or NULL if the string does not begin with the name
33       of a recognised symbolic key.
34

SEE ALSO

36       termkey_get_keyname(3),   termkey_keyname2sym(3),   termkey_strpkey(3),
37       termkey(7)
38
39
40
41                                                     TERMKEY_LOOKUP_KEYNAME(3)
Impressum