input_regs(&ahid->input, regs); input_report_key(&ahid->input, KEY_CAPSLOCK, 1); input_report_key(&ahid->input, KEY_CAPSLOCK, 0); input_sync(&ahid->input); 
input_regs(ahid->input, regs); input_report_key(ahid->input, KEY_CAPSLOCK, 1); input_report_key(ahid->input, KEY_CAPSLOCK, 0); input_sync(ahid->input); 
adbhid_input_keycode(int id, int keycode, int repeat, struct pt_regs *regs){	struct adbhid *ahid = adbhid[id];	int up_flag;	up_flag = (keycode & 0x80);	keycode &= 0x7f;	switch (keycode) {	case ADB_KEY_CAPSLOCK: /* Generate down/up events for CapsLock everytime. */		input_regs(&ahid->input, regs);		input_report_key(&ahid->input, KEY_CAPSLOCK, 1);		input_report_key(&ahid->input, KEY_CAPSLOCK, 0);		input_sync(&ahid->input);		return;#ifdef CONFIG_PPC_PMAC	case ADB_KEY_POWER_OLD: /* Power key on PBook 3400 needs remapping */		switch(pmac_call_feature(PMAC_FTR_GET_MB_INFO,			NULL, PMAC_MB_INFO_MODEL, 0)) {		case PMAC_TYPE_COMET:		case PMAC_TYPE_HOOPER:		case PMAC_TYPE_KANGA:			keycode = ADB_KEY_POWER;		}		break;	case ADB_KEY_POWER: 		/* Fn + Command will produce a bogus "power" keycode */		if (ahid->flags & FLAG_FN_KEY_PRESSED) {			keycode = ADB_KEY_CMD;			if (up_flag)				ahid->flags &= ~FLAG_POWER_FROM_FN;			else				ahid->flags |= FLAG_POWER_FROM_FN;		} else if (ahid->flags & FLAG_POWER_FROM_FN) {			keycode = ADB_KEY_CMD;			ahid->flags &= ~FLAG_POWER_FROM_FN;		}		break;	case ADB_KEY_FN:		/* Keep track of the Fn key state */		if (up_flag) {			ahid->flags &= ~FLAG_FN_KEY_PRESSED;			/* Emulate Fn+delete = forward delete */			if (ahid->flags & FLAG_EMU_FWDEL_DOWN) {				ahid->flags &= ~FLAG_EMU_FWDEL_DOWN;				keycode = ADB_KEY_FWDEL;				break;			}		} else			ahid->flags |= FLAG_FN_KEY_PRESSED;		/* Swallow the key press */		return;	case ADB_KEY_DEL:		/* Emulate Fn+delete = forward delete */		if (ahid->flags & FLAG_FN_KEY_PRESSED) {			keycode = ADB_KEY_FWDEL;			if (up_flag)				ahid->flags &= ~FLAG_EMU_FWDEL_DOWN;			else				ahid->flags |= FLAG_EMU_FWDEL_DOWN;		}		break;#endif /* CONFIG_PPC_PMAC */	}	if (adbhid[id]->keycode[keycode]) {		input_regs(&adbhid[id]->input, regs);		input_report_key(&adbhid[id]->input,				 adbhid[id]->keycode[keycode], !up_flag);		input_sync(&adbhid[id]->input);	} else		printk(KERN_INFO "Unhandled ADB key (scancode %#02x) %s.\n", keycode,		       up_flag ? "released" : "pressed");}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/c7f7a569d9b4ea7c53ab6fcd1377895312d8372b/adbhid.c/clean/drivers/macintosh/adbhid.c