Index: uspace/drv/usbhid/subdrivers.c
===================================================================
--- uspace/drv/usbhid/subdrivers.c	(revision f76153ceba1ad9296b8ba7195a680836165aee25)
+++ uspace/drv/usbhid/subdrivers.c	(revision 1cbb4b7df3b478e0dda92c959b87f5b3358695ec)
@@ -35,6 +35,7 @@
 
 #include "subdrivers.h"
+#include "usb/classes/hidut.h"
 
-static usb_hid_subdriver_usage_t path_kbd[] = {{0, 7}};
+static usb_hid_subdriver_usage_t path_kbd[] = {{USB_HIDUT_PAGE_KEYBOARD, 0}};
 
 const usb_hid_subdriver_mapping_t usb_hid_subdrivers[] = {
Index: uspace/drv/usbhid/usbhid.c
===================================================================
--- uspace/drv/usbhid/usbhid.c	(revision f76153ceba1ad9296b8ba7195a680836165aee25)
+++ uspace/drv/usbhid/usbhid.c	(revision 1cbb4b7df3b478e0dda92c959b87f5b3358695ec)
@@ -171,4 +171,5 @@
 	usb_hid_report_path_t *usage_path = usb_hid_report_path();
 	if (usage_path == NULL) {
+		usb_log_debug("Failed to create usage path.\n");
 		return false;
 	}
@@ -177,4 +178,5 @@
 		if (usb_hid_report_path_append_item(usage_path, 
 		    path[i].usage_page, path[i].usage) != EOK) {
+			usb_log_debug("Failed to append to usage path.\n");
 			usb_hid_report_path_free(usage_path);
 			return false;
@@ -182,10 +184,14 @@
 	}
 	
-	bool matches = (usb_hid_report_input_length(hid_dev->parser, usage_path, 
-	    compare) > 0);
+	assert(hid_dev->parser != NULL);
+	
+	usb_log_debug("Compare flags: %d\n", compare);
+	size_t size = usb_hid_report_input_length(hid_dev->parser, usage_path, 
+	    compare);
+	usb_log_debug("Size of the input report: %d\n", size);
 	
 	usb_hid_report_path_free(usage_path);
 	
-	return matches;
+	return (size > 0);
 }
 
@@ -260,8 +266,11 @@
 		
 		if (mapping->usage_path != NULL) {
+			usb_log_debug("Comparing device against usage path.\n");
 			if (usb_hid_path_matches(hid_dev, 
 			    mapping->usage_path, mapping->path_size,
 			    mapping->compare)) {
 				subdrivers[count++] = &mapping->subdriver;
+			} else {
+				usb_log_debug("Not matched.\n");
 			}
 		}
@@ -552,5 +561,5 @@
 	// free the subdrivers info
 	if ((*hid_dev)->subdrivers != NULL) {
-		free(subdrivers);
+		free((*hid_dev)->subdrivers);
 	}
 
Index: uspace/lib/usb/src/hidparser.c
===================================================================
--- uspace/lib/usb/src/hidparser.c	(revision f76153ceba1ad9296b8ba7195a680836165aee25)
+++ uspace/lib/usb/src/hidparser.c	(revision 1cbb4b7df3b478e0dda92c959b87f5b3358695ec)
@@ -900,4 +900,6 @@
 	item->usage_page = usage_page;
 	
+	usb_log_debug("Appending usage %d, usage page %d\n", usage, usage_page);
+	
 	list_append (&usage_path->link, &item->link);
 	usage_path->depth++;
