summaryrefslogtreecommitdiff
path: root/src/rblib.h
blob: dcc6d10e6755666e18d37b0a8ba762c438b61e1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef _RBLIB_HEADERS
#define _RBLIB_HEADERS

#include <stdint.h>

#define FUNCTION        0x100   /* pertinent bit in 16-bit key return */
#define FUNKEY(keyval)  (keyval & FUNCTION)

static struct rb_keydef {
    const char *name;
    int16_t l1code;
}

static struct rb_keydef special_keys[] = {
    {"Print Screen", (FUNCTION |   2)},
    {"F4",           (FUNCTION |   4)},
    {"Break",        (FUNCTION |   5)},
    {"Interrupt",    (FUNCTION |   6)},
    {"Resume",       (FUNCTION |   7)},
    {"Cancel",       (FUNCTION |   8)},
    {"Backspace",    8},
    {"Main Screen",  (FUNCTION |   9)},
    {"Tab",          9},
    {"Exit",         (FUNCTION |  10)},
    {"Line Feed",    10},
    {"Return",       13},
    {"Additional Options", (FUNCTION |  14)},
    {"Help",         (FUNCTION |  15)},
    {"Do",           (FUNCTION |  16)},
    {"F17",          (FUNCTION |  17)},
    {"F18",          (FUNCTION |  18)},
    {"F19",          (FUNCTION |  19)},
    {"F20",          (FUNCTION |  20)},
    {"Find",         (FUNCTION |  21)},
    {"Insert",       (FUNCTION |  22)},
    {"Remove",       (FUNCTION |  23)},
    {"Select",       (FUNCTION |  24)},
    {"Previous Screen", (FUNCTION |  25)},
    {"Next Screen",     (FUNCTION |  26)},
    {"Up",           (FUNCTION |  27)},
    {"Escape",       27},
    {"Left",         (FUNCTION |  28)},
    {"Down",         (FUNCTION |  29)},
    {"Right",        (FUNCTION |  30)},
    {"Keypad 0",     (FUNCTION |  31)},
    {"Keypad 1",     (FUNCTION |  32)},
    {"Keypad 2",     (FUNCTION |  33)},
    {"Keypad 3",     (FUNCTION |  34)},
    {"Keypad 4",     (FUNCTION |  35)},
    {"Keypad 5",     (FUNCTION |  36)},
    {"Keypad 6",     (FUNCTION |  37)},
    {"Keypad 7",     (FUNCTION |  38)},
    {"Keypad 8",     (FUNCTION |  39)},
    {"Keypad 9",     (FUNCTION |  40)},
    {"Keypad '",     (FUNCTION |  41)},
    {"Keypad -",     (FUNCTION |  42)},
    {"Keypad .",     (FUNCTION |  43)},
    {"PF1",          (FUNCTION |  44)},
    {"PF2",          (FUNCTION |  45)},
    {"PF3",          (FUNCTION |  46)},
    {"PF4",          (FUNCTION |  47)},
    {"Keypad Enter", (FUNCTION |  48)},
    {"Delete",       0x7f},
    {NULL, -1},
}
#endif /* _RBLIB_HEADERS */