Blob


1 #ifndef _KEYBOARD_H_
2 #define _KEYBOARD_H_ 1
3 #if defined(__cplusplus)
4 extern "C" {
5 #endif
6 typedef struct Keyboardctl Keyboardctl;
8 struct Keyboardctl
9 {
10 struct Channel *c; /* chan(Rune)[20] */
12 char *file;
13 int consfd; /* to cons file */
14 int ctlfd; /* to ctl file */
15 int pid; /* of slave proc */
16 };
19 extern Keyboardctl* initkeyboard(char*);
20 extern int ctlkeyboard(Keyboardctl*, char*);
21 extern void closekeyboard(Keyboardctl*);
23 enum {
24 KF= 0xF000, /* Rune: beginning of private Unicode space */
25 /* KF|1, KF|2, ..., KF|0xC is F1, F2, ..., F12 */
26 Khome= KF|0x0D,
27 Kup= KF|0x0E,
28 Kpgup= KF|0x0F,
29 Kprint= KF|0x10,
30 Kleft= KF|0x11,
31 Kright= KF|0x12,
32 Kdown= 0x80,
33 Kview= 0x80,
34 Kpgdown= KF|0x13,
35 Kins= KF|0x14,
36 Kend= '\r', /* [sic] */
38 Kalt= KF|0x15,
39 Kshift= KF|0x16,
40 Kctl= KF|0x17,
41 };
43 #if defined(__cplusplus)
44 }
45 #endif
46 #endif