Index: uspace/lib/usb/src/hidparser.c
===================================================================
--- uspace/lib/usb/src/hidparser.c	(revision 0bd4810ce0faf13c2d91fb897a1d5d2e5ccaf73c)
+++ uspace/lib/usb/src/hidparser.c	(revision 33382a964e9e38a380c6b1611b0c1a0055ef5d90)
@@ -607,16 +607,8 @@
 
 	// get the size of result keycodes array
-	list_item = parser->input.next;	   
-	while(list_item != &(parser->input)) {
-
-		item = list_get_instance(list_item, usb_hid_report_item_t, link);
-		if(item->usage_page == BAD_HACK_USAGE_PAGE) {
-			key_count += item->count;
-		}
-
-		list_item = list_item->next;
-	}
-
-	
+	usb_hid_report_path_t path;
+	path.usage_page = BAD_HACK_USAGE_PAGE;
+	key_count = usb_hid_report_input_length(parser, &path);
+
 	if(!(keys = malloc(sizeof(uint8_t) * key_count))){
 		return ENOMEM;
@@ -628,5 +620,6 @@
 
 		item = list_get_instance(list_item, usb_hid_report_item_t, link);
-		if(item->usage_page == BAD_HACK_USAGE_PAGE) {
+		if(!USB_HID_ITEM_FLAG_CONSTANT(item->item_flags) &&
+		   (item->usage_page == BAD_HACK_USAGE_PAGE)) {
 			for(j=0; j<(size_t)(item->count); j++) {
 				keys[i++] = usb_hid_translate_data(item, data,j);
@@ -730,5 +723,6 @@
 	while(&parser->input != item) {
 		report_item = list_get_instance(item, usb_hid_report_item_t, link);
-		if(report_item->usage_page == path->usage_page) {
+		if(!USB_HID_ITEM_FLAG_CONSTANT(report_item->item_flags) &&
+		   (report_item->usage_page == path->usage_page)) {
 			ret += report_item->count;
 		}
