Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#ifdef PLAN9
2
#pragma src "/sys/src/libdraw"
3
#pragma lib "libdraw.a"
4
#endif
5
 
6
typedef struct 	Keyboardctl Keyboardctl;
7
typedef struct	Channel	Channel;
8
 
9
struct	Keyboardctl
10
{
11
	Channel	*c;	/* chan(Rune)[20] */
12
 
13
	char		*file;
14
	int		consfd;		/* to cons file */
15
	int		ctlfd;		/* to ctl file */
16
	int		pid;		/* of slave proc */
17
};
18
 
19
 
20
extern	Keyboardctl*	initkeyboard(char*);
21
extern	int			ctlkeyboard(Keyboardctl*, char*);
22
extern	void			closekeyboard(Keyboardctl*);
23
 
24
enum {
25
    KF= 0xF000, /* Rune: beginning of private Unicode space */
26
    Spec=   0xF800,
27
    /* KF|1, KF|2, ..., KF|0xC is F1, F2, ..., F12 */
28
    Khome=  KF|0x0D,
29
    Kup=    KF|0x0E,
30
    Kpgup=  KF|0x0F,
31
    Kprint= KF|0x10,
32
    Kleft=  KF|0x11,
33
    Kright= KF|0x12,
34
    Kdown=  Spec|0x00,
35
    Kview=  Spec|0x00,  
36
    Kpgdown=    KF|0x13,
37
    Kins=   KF|0x14,
38
    Kend=   KF|0x18,
39
 
40
    Kalt=       KF|0x15,
41
    Kshift= KF|0x16,    
42
    Kctl=       KF|0x17,
43
};
44