]> git.lizzy.rs Git - plan9front.git/blob - sys/include/keyboard.h
brk(2): sbrk(0) returns end address, not the base
[plan9front.git] / sys / include / keyboard.h
1 #pragma src "/sys/src/libdraw"
2 #pragma lib "libdraw.a"
3
4 typedef struct  Keyboardctl Keyboardctl;
5 typedef struct  Channel Channel;
6
7 struct  Keyboardctl
8 {
9         Channel *c;     /* chan(Rune)[20] */
10
11         char            *file;
12         int             consfd;         /* to cons file */
13         int             ctlfd;          /* to ctl file */
14         int             pid;            /* of slave proc */
15 };
16
17
18 extern  Keyboardctl*    initkeyboard(char*);
19 extern  int             ctlkeyboard(Keyboardctl*, char*);
20 extern  void            closekeyboard(Keyboardctl*);
21
22 enum {
23         KF=     0xF000, /* Rune: beginning of private Unicode space */
24         Spec=   0xF800,
25         PF=     Spec|0x20,      /* num pad function key */
26         Kview=  Spec|0x00,      /* view (shift window up) */
27         /* KF|1, KF|2, ..., KF|0xC is F1, F2, ..., F12 */
28         Khome=  KF|0x0D,
29         Kup=    KF|0x0E,
30         Kdown=  Kview,
31         Kpgup=  KF|0x0F,
32         Kprint= KF|0x10,
33         Kleft=  KF|0x11,
34         Kright= KF|0x12,
35         Kpgdown=        KF|0x13,
36         Kins=   KF|0x14,
37
38         Kalt=   KF|0x15,
39         Kshift= KF|0x16,
40         Kctl=   KF|0x17,
41
42         Kend=   KF|0x18,
43         Kscroll=        KF|0x19,
44         Kscrolloneup=   KF|0x20,
45         Kscrollonedown= KF|0x21,
46
47         Ksoh=   0x01,
48         Kstx=   0x02,
49         Ketx=   0x03,
50         Keof=   0x04,
51         Kenq=   0x05,
52         Kack=   0x06,
53         Kbs=    0x08,
54         Knack=  0x15,
55         Ketb=   0x17,
56         Kdel=   0x7f,
57         Kesc=   0x1b,
58
59         Kbreak= Spec|0x61,
60         Kcaps=  Spec|0x64,
61         Knum=   Spec|0x65,
62         Kmiddle=        Spec|0x66,
63         Kaltgr= Spec|0x67,
64         Kmod4=  Spec|0x68,
65         Kmouse= Spec|0x100,
66 };