plan 9 kernel history: overview | file list | diff list

1992/0918/pc/kbd.c (diff list | history)

1992/0904/sys/src/9/pc/kbd.c:295,3001992/0918/sys/src/9/pc/kbd.c:295,302 (short | long | prev | next)
1991/1210    
	} 
1991/0731    
} 
1991/0730    
 
1992/0918    
static int shift; 
 
1991/0731    
/* 
 *  mouse message is three bytes 
 * 
1992/0904/sys/src/9/pc/kbd.c:301,3061992/0918/sys/src/9/pc/kbd.c:303,310
1991/0731    
 *	byte 0 -	0 0 SDY SDX 1 M R L 
 *	byte 1 -	DX 
 *	byte 2 -	DY 
1992/0918    
 * 
 *  shift & left button is the same as middle button 
1991/0731    
 */ 
static void 
mymouseputc(int c) 
1992/0904/sys/src/9/pc/kbd.c:307,3131992/0918/sys/src/9/pc/kbd.c:311,317
1991/0731    
{ 
	static short msg[3]; 
	static int nb; 
1991/0809    
	static uchar b[] = {0, 1, 4, 5, 2, 3, 6, 7}; 
1992/0918    
	static uchar b[] = {0, 1, 4, 5, 2, 3, 6, 7, 0, 1, 2, 5, 2, 3, 6, 7 }; 
1991/0731    
	static lastdx, lastdy; 
	extern Mouseinfo mouse; 
 
1992/0904/sys/src/9/pc/kbd.c:325,3311992/0918/sys/src/9/pc/kbd.c:329,335
1991/0731    
		if(msg[0] & 0x20) 
			msg[2] |= 0xFF00; 
 
1991/0911    
		mousebuttons = b[msg[0]&7]; 
1992/0918    
		mousebuttons = b[(msg[0]&7) | (shift ? 8 : 0)]; 
1992/0811    
		mouse.newbuttons = mousebuttons | keybuttons; 
1991/0731    
		mouse.dx = msg[1]; 
		mouse.dy = -msg[2]; 
1992/0904/sys/src/9/pc/kbd.c:369,3751992/0918/sys/src/9/pc/kbd.c:373,378
1991/0703    
{ 
1992/0711    
	int s, c, i, nk; 
1991/0703    
	static int esc1, esc2; 
	static int shift; 
	static int caps; 
	static int ctl; 
	static int num; 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)