rem: sIsExtended = false;
context: handle_keyboard_interrupt(void *data){	// TODO: Handle braindead "pause" key special case	at_kbd_io keyInfo;	unsigned char read, scancode;			read = gIsa->read_io_8(PS2_PORT_DATA);	TRACE(("handle_keyboard_interrupt: read = 0x%x\n", read));	if (read == 0xE0) {		sIsExtended = true;		TRACE(("Extended key\n"));		return B_HANDLED_INTERRUPT;	} 			scancode = read;		TRACE(("scancode: %x\n", scancode));	// For now, F12 enters the kernel debugger	// ToDo: remove me later :-)	if (scancode == 88)		panic("keyboard requested halt.\n");	if (scancode & 0x80) {		keyInfo.is_keydown = false;		scancode -= 0x80;		} else		keyInfo.is_keydown = true;	if (sIsExtended)		scancode |= 0x80;		keyInfo.timestamp = system_time();	keyInfo.scancode = scancode;		// TODO: Check return value	cbuf_memcpy_to_chain(keyboard_buf, 0, (void *)&keyInfo, sizeof(keyInfo));	release_sem_etc(sKeyboardSem, 1, B_DO_NOT_RESCHEDULE);		sIsExtended = false;			return B_INVOKE_SCHEDULER;}