Index: uspace/drv/usbhid/kbddev.c
===================================================================
--- uspace/drv/usbhid/kbddev.c	(revision 35f0899576bb8cb925374096a7828f751ec249b3)
+++ uspace/drv/usbhid/kbddev.c	(revision f8c190e768fdf2aba3d83eeefd2438f4e03e634a)
@@ -63,4 +63,5 @@
 static const size_t BOOTP_BUFFER_SIZE = 8;
 static const size_t BOOTP_BUFFER_OUT_SIZE = 1;
+static const uint8_t BOOTP_ERROR_ROLLOVER = 1;
 static const uint8_t IDLE_RATE = 0;
 
@@ -319,8 +320,21 @@
     const uint8_t *key_codes)
 {
-	// TODO: phantom state!!
-	
 	unsigned int key;
 	unsigned int i, j;
+	
+	/*
+	 * First of all, check if the kbd have reported phantom state.
+	 */
+	i = 0;
+	// all fields should report Error Rollover
+	while (i < kbd_dev->keycode_count &&
+	    key_codes[i] == BOOTP_ERROR_ROLLOVER) {
+		++i;
+	}
+	if (i == kbd_dev->keycode_count) {
+		usb_log_debug("Phantom state occured.\n");
+		// phantom state, do nothing
+		return;
+	}
 	
 	// TODO: quite dummy right now, think of better implementation
@@ -341,5 +355,5 @@
 			key = usbhid_parse_scancode(kbd_dev->keycodes[j]);
 			usbhid_kbd_push_ev(kbd_dev, KEY_RELEASE, key);
-			usb_log_debug2("\nKey released: %d\n", key);
+			usb_log_debug2("Key released: %d\n", key);
 		} else {
 			// found, nothing happens
@@ -361,5 +375,5 @@
 			// not found, i.e. new key pressed
 			key = usbhid_parse_scancode(key_codes[i]);
-			usb_log_debug2("\nKey pressed: %d (keycode: %d)\n", key,
+			usb_log_debug2("Key pressed: %d (keycode: %d)\n", key,
 			    key_codes[i]);
 			usbhid_kbd_push_ev(kbd_dev, KEY_PRESS, key);
@@ -372,5 +386,5 @@
 //		if (key_codes[i] != 0) {
 //			key = usbhid_parse_scancode(key_codes[i]);
-//			usb_log_debug2("\nKey pressed: %d (keycode: %d)\n", key,
+//			usb_log_debug2("Key pressed: %d (keycode: %d)\n", key,
 //			    key_codes[i]);
 //			usbhid_kbd_push_ev(kbd_dev, KEY_PRESS, key);
