1TERMKEY_INTERPRET_STRING(3)Library Functions ManualTERMKEY_INTERPRET_STRING(3)
2
3
4

NAME

6       termkey_interpret_string - fetch stored control string
7

SYNOPSIS

9       #include <termkey.h>
10
11       TermKeyResult termkey_interpret_string(TermKey *tk, const TermKeyKey *key,
12           const char **strp);
13
14       Link with -ltermkey.
15

DESCRIPTION

17       termkey_interpret_string()  fetches  the  string  stored in the TermKey
18       instance  from  the  most   recently   received   TERMKEY_TYPE_DCS   or
19       TERMKEY_TYPE_OSC event. Note that it is important to call this function
20       as soon as possible after obtaining a one of these  string  key  event;
21       specifically,  before  calling  termkey_getkey()  or  termkey_waitkey()
22       again, as a subsequent call will overwrite the buffer  space  currently
23       containing this string.
24
25       The  string pointer whose address is given by strp will be set to point
26       at the actual stored string in the instance. The caller is free to read
27       this  string  (which  will be correctly NUL-terminated), but should not
28       modify it. It is not necessary to free() the  pointer;  the  containing
29       TermKey instance will do that.
30

RETURN VALUE

32       If  passed  the  most  recent key event of the type TERMKEY_TYPE_DCS or
33       TERMKEY_TYPE_OSC, this function will return  TERMKEY_RES_KEY  and  will
34       affect the variables whose pointers were passed in, as described above.
35
36       For   other   event   types,   or   stale   events,   it   will  return
37       TERMKEY_RES_NONE, and its effects on any variables whose pointers  were
38       passed in are undefined.
39

SEE ALSO

41       termkey_waitkey(3), termkey_getkey(3), termkey(7)
42
43
44
45                                                   TERMKEY_INTERPRET_STRING(3)
Impressum