1TERMKEY_INTERPRET_MODEREPORTL(i3b)rary Functions ManTuEaRlMKEY_INTERPRET_MODEREPORT(3)
2
3
4
6 termkey_interpret_modereport - interpret opaque mode report data
7
9 #include <termkey.h>
10
11 TermKeyResult termkey_interpret_modereport(TermKey *tk, const TermKeyKey *key,
12 int *initial, int *mode, int *value);
13
14 Link with -ltermkey.
15
17 termkey_interpret_modereport() fills in variables in the passed point‐
18 ers according to the mode report event found in key. It should be
19 called if termkey_getkey(3) or similar have returned a key event with
20 the type of TERMKEY_TYPE_MODEREPORT.
21
22 Any pointer may instead be given as NULL to not return that value.
23
24 The initial variable will be filled with 0 for an ANSI mode report, or
25 '?' for a DEC mode report. The mode variable will be filled with the
26 number of the mode, and value will be filled with the value from the
27 report.
28
30 If passed a key event of the type TERMKEY_TYPE_MODEREPORT, this func‐
31 tion will return TERMKEY_RES_KEY and will affect the variables whose
32 pointers were passed in, as described above.
33
34 For other event types it will return TERMKEY_RES_NONE, and its effects
35 on any variables whose pointers were passed in, are undefined.
36
38 termkey_waitkey(3), termkey_getkey(3), termkey(7)
39
40
41
42 TERMKEY_INTERPRET_MODEREPORT(3)