Index: uspace/lib/usb/include/usb/classes/hidparser.h
===================================================================
--- uspace/lib/usb/include/usb/classes/hidparser.h	(revision 6e3b9a58b081735910fd5e1021d0427056ca9eb3)
+++ uspace/lib/usb/include/usb/classes/hidparser.h	(revision fc5ed5dee7e65b8744a655665eee2259fa6febc4)
@@ -52,14 +52,25 @@
  * Input/Output/Feature Item flags
  */
-#define USB_HID_ITEM_FLAG_CONSTANT(flags) 	(flags & 0x1)
-#define USB_HID_ITEM_FLAG_VARIABLE(flags) 	(flags & 0x2)
-#define USB_HID_ITEM_FLAG_RELATIVE(flags) 	(flags & 0x4)
-#define USB_HID_ITEM_FLAG_WRAP(flags)		(flags & 0x8)
-#define USB_HID_ITEM_FLAG_LINEAR(flags)		(flags & 0x10)
-#define USB_HID_ITEM_FLAG_PREFERRED(flags)	(flags & 0x20)
-#define USB_HID_ITEM_FLAG_POSITION(flags)	(flags & 0x40)
-#define USB_HID_ITEM_FLAG_VOLATILE(flags)	(flags & 0x80)
-#define USB_HID_ITEM_FLAG_BUFFERED(flags)	(flags & 0x100)
-
+/** Constant (1) / Variable (0) */
+#define USB_HID_ITEM_FLAG_CONSTANT(flags) 	((flags & 0x1) == 0x1)
+/** Variable (1) / Array (0) */
+#define USB_HID_ITEM_FLAG_VARIABLE(flags) 	((flags & 0x2) == 0x2)
+/** Absolute / Relative*/
+#define USB_HID_ITEM_FLAG_RELATIVE(flags) 	((flags & 0x4) == 0x4)
+/** Wrap / No Wrap */
+#define USB_HID_ITEM_FLAG_WRAP(flags)		((flags & 0x8) == 0x8)
+#define USB_HID_ITEM_FLAG_LINEAR(flags)		((flags & 0x10) == 0x10)
+#define USB_HID_ITEM_FLAG_PREFERRED(flags)	((flags & 0x20) == 0x20)
+#define USB_HID_ITEM_FLAG_POSITION(flags)	((flags & 0x40) == 0x40)
+#define USB_HID_ITEM_FLAG_VOLATILE(flags)	((flags & 0x80) == 0x80)
+#define USB_HID_ITEM_FLAG_BUFFERED(flags)	((flags & 0x100) == 0x100)
+
+
+/**
+ * Description of path of usage pages and usages in report descriptor
+ */
+typedef struct {
+	int32_t usage_page;
+} usb_hid_report_path_t;
 
 /**
@@ -185,4 +196,7 @@
     const usb_hid_report_in_callbacks_t *callbacks, void *arg);
 
+int usb_hid_report_input_length(const usb_hid_report_parser_t *parser,
+	const usb_hid_report_path_t *path);
+
 
 void usb_hid_free_report_parser(usb_hid_report_parser_t *parser);
Index: uspace/lib/usb/src/hidparser.c
===================================================================
--- uspace/lib/usb/src/hidparser.c	(revision 6e3b9a58b081735910fd5e1021d0427056ca9eb3)
+++ uspace/lib/usb/src/hidparser.c	(revision fc5ed5dee7e65b8744a655665eee2259fa6febc4)
@@ -178,4 +178,8 @@
 					}
 					memcpy(new_report_item,report_item, sizeof(usb_hid_report_item_t));
+					/* reset local items */
+					new_report_item->usage_minimum = 0;
+					new_report_item->usage_maximum = 0;
+					
 					link_initialize(&(new_report_item->link));
 					report_item = new_report_item;
@@ -501,5 +505,6 @@
 		usb_log_debug("\tCOUNT: %X\n", report_item->count);
 		usb_log_debug("\tSIZE: %X\n", report_item->size);
-		usb_log_debug("\tCONSTANT: %X\n", USB_HID_ITEM_FLAG_CONSTANT(report_item->item_flags));
+		usb_log_debug("\tCONSTANT/VAR: %X\n", USB_HID_ITEM_FLAG_CONSTANT(report_item->item_flags));
+		usb_log_debug("\tVARIABLE/ARRAY: %X\n", USB_HID_ITEM_FLAG_VARIABLE(report_item->item_flags));
 		usb_log_debug("\tUSAGE: %X\n", report_item->usage);
 		usb_log_debug("\tUSAGE PAGE: %X\n", report_item->usage_page);
@@ -508,4 +513,7 @@
 		usb_log_debug("\tPHYMIN: %X\n", report_item->physical_minimum);		
 		usb_log_debug("\tPHYMAX: %X\n", report_item->physical_maximum);				
+		usb_log_debug("\tUSAGEMIN: %X\n", report_item->usage_minimum);
+		usb_log_debug("\tUSAGEMAX: %X\n", report_item->usage_maximum);
+		
 		usb_log_debug("\n");		
 
@@ -602,4 +610,5 @@
 	usb_hid_report_item_t *item;
 	uint8_t *keys;
+	uint8_t item_value;
 	size_t key_count=0;
 	size_t i=0;
@@ -607,16 +616,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,7 +629,21 @@
 
 		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 == path.usage_page)) {
 			for(j=0; j<(size_t)(item->count); j++) {
-				keys[i++] = usb_hid_translate_data(item, data,j);
+				if((USB_HID_ITEM_FLAG_VARIABLE(item->item_flags) == 0) ||
+				   ((item->usage_minimum == 0) && (item->usage_maximum == 0))) {
+					// variable item
+					keys[i++] = usb_hid_translate_data(item, data,j);
+				}
+				else {
+					// bitmapa
+					if((item_value = usb_hid_translate_data(item, data, j)) != 0) {
+						keys[i++] = j + item->usage_minimum;
+					}
+					else {
+						keys[i++] = 0;
+					}
+				}
 			}
 		}
@@ -719,4 +734,28 @@
 	
 }
+
+int usb_hid_report_input_length(const usb_hid_report_parser_t *parser,
+	const usb_hid_report_path_t *path)
+{
+	int ret = 0;
+	link_t *item;
+	usb_hid_report_item_t *report_item;
+
+	item = (&parser->input)->next;
+	while(&parser->input != item) {
+		report_item = list_get_instance(item, usb_hid_report_item_t, link);
+		if(!USB_HID_ITEM_FLAG_CONSTANT(report_item->item_flags) &&
+		   (report_item->usage_page == path->usage_page)) {
+			ret += report_item->count;
+		}
+
+		item = item->next;
+	} 
+
+	return ret;
+}
+
+
+
 /**
  * @}
