blob: 588600a7736e1fce001aab37ab7f7dcb7a7185e8 [file] [log] [blame]
rscf7012582003-11-25 01:40:27 +00001#ifndef _KEYBOARD_H_
2#define _KEYBOARD_H_ 1
3#if defined(__cplusplus)
4extern "C" {
5#endif
rscb2cfc4e2003-09-30 17:47:41 +00006typedef struct Keyboardctl Keyboardctl;
7
8struct Keyboardctl
9{
10 struct Channel *c; /* chan(Rune)[20] */
11
12 char *file;
13 int consfd; /* to cons file */
14 int ctlfd; /* to ctl file */
15 int pid; /* of slave proc */
16};
17
18
19extern Keyboardctl* initkeyboard(char*);
20extern int ctlkeyboard(Keyboardctl*, char*);
21extern void closekeyboard(Keyboardctl*);
22
23enum {
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] */
37
38 Kalt= KF|0x15,
39 Kshift= KF|0x16,
40 Kctl= KF|0x17,
41};
rscf7012582003-11-25 01:40:27 +000042
43#if defined(__cplusplus)
44}
45#endif
46#endif