Index: uspace/lib/usb/include/usb/classes/hidparser.h
===================================================================
--- uspace/lib/usb/include/usb/classes/hidparser.h	(revision 00c2d0353f86dcf5afd8ee269a54de87fc0d6728)
+++ uspace/lib/usb/include/usb/classes/hidparser.h	(revision 2f60e57de62931ac2568d3cc4757af6a827a6565)
@@ -38,7 +38,24 @@
 #include <stdint.h>
 
+/**
+ * Description of report items
+ */
+typedef struct {
+
+	uint8_t usage_min;
+	uint8_t usage_max;
+	uint8_t logical_min;
+	uint8_t logical_max;
+	uint8_t size;
+	uint8_t count;
+	uint8_t offset;
+
+} usb_hid_report_item_t;
+
+
 /** HID report parser structure. */
 typedef struct {
 } usb_hid_report_parser_t;
+
 
 /** HID parser callbacks for IN items. */
@@ -50,6 +67,21 @@
 	 * @param arg Custom argument.
 	 */
-	void (*keyboard)(const uint16_t *key_codes, size_t count, void *arg);
+	void (*keyboard)(const uint8_t *key_codes, size_t count, const uint8_t modifiers, void *arg);
 } usb_hid_report_in_callbacks_t;
+
+#define USB_HID_BOOT_KEYBOARD_NUM_LOCK		0x01
+#define USB_HID_BOOT_KEYBOARD_CAPS_LOCK		0x02
+#define USB_HID_BOOT_KEYBOARD_SCROLL_LOCK	0x04
+#define USB_HID_BOOT_KEYBOARD_COMPOSE		0x08
+#define USB_HID_BOOT_KEYBOARD_KANA			0x10
+
+/*
+ * modifiers definitions
+ */
+
+int usb_hid_boot_keyboard_input_report(const uint8_t *data, size_t size,
+	const usb_hid_report_in_callbacks_t *callbacks, void *arg);
+
+int usb_hid_boot_keyboard_output_report(uint8_t leds, uint8_t *data, size_t size);
 
 int usb_hid_parse_report_descriptor(usb_hid_report_parser_t *parser, 
@@ -60,4 +92,7 @@
     const usb_hid_report_in_callbacks_t *callbacks, void *arg);
 
+
+int usb_hid_free_report_parser(usb_hid_report_parser_t *parser);
+
 #endif
 /**
Index: uspace/lib/usb/src/hidparser.c
===================================================================
--- uspace/lib/usb/src/hidparser.c	(revision 00c2d0353f86dcf5afd8ee269a54de87fc0d6728)
+++ uspace/lib/usb/src/hidparser.c	(revision 2f60e57de62931ac2568d3cc4757af6a827a6565)
@@ -40,5 +40,4 @@
  * @param parser Opaque HID report parser structure.
  * @param data Data describing the report.
- * @param size Size of the descriptor in bytes.
  * @return Error code.
  */
@@ -55,5 +54,4 @@
  * @param parser Opaque HID report parser structure.
  * @param data Data for the report.
- * @param size Size of the data in bytes.
  * @param callbacks Callbacks for report actions.
  * @param arg Custom argument (passed through to the callbacks).
@@ -66,7 +64,10 @@
 	int i;
 	
-	// TODO: parse report
+	/* main parsing loop */
+	while(0){
+	}
 	
-	uint16_t keys[6];
+	
+	uint8_t keys[6];
 	
 	for (i = 0; i < 6; ++i) {
@@ -74,6 +75,17 @@
 	}
 	
-	callbacks->keyboard(keys, 6, arg);
-	
+	callbacks->keyboard(keys, 6, 0, arg);
+
+	return EOK;
+}
+
+/** Free the HID report parser structure 
+ *
+ * @param parser Opaque HID report parser structure
+ * @return Error code
+ */
+int usb_hid_free_report_parser(usb_hid_report_parser_t *parser)
+{
+
 	return EOK;
 }
@@ -81,4 +93,64 @@
 
 /**
+ * Parse input report.
+ *
+ * @param data Data for report
+ * @param size Size of report
+ * @param callbacks Callbacks for report actions
+ * @param arg Custom arguments
+ *
+ * @return Error code
+ */
+int usb_hid_boot_keyboard_input_report(const uint8_t *data, size_t size,
+	const usb_hid_report_in_callbacks_t *callbacks, void *arg)
+{
+	int i;
+	usb_hid_report_item_t item;
+
+	/* fill item due to the boot protocol report descriptor */
+	// modifier keys are in the first byte
+	uint8_t modifiers = data[0];
+
+	item.offset = 2; /* second byte is reserved */
+	item.size = 8;
+	item.count = 6;
+	item.usage_min = 0;
+	item.usage_max = 255;
+	item.logical_min = 0;
+	item.logical_max = 255;
+
+	if(size != 8){
+		return -1;
+	}
+
+	uint8_t keys[6];
+	for(i=item.offset; i<item.count; i++) {
+		keys[i-2] = data[i];
+	}
+
+	callbacks->keyboard(keys, 6, modifiers, arg);
+	return EOK;
+}
+
+/**
+ * Makes output report for keyboard boot protocol
+ *
+ * @param leds
+ * @param output Output report data buffer
+ * @param size Size of the output buffer
+ * @return Error code
+ */
+int usb_hid_boot_keyboard_output_report(uint8_t leds, uint8_t *data, size_t size)
+{
+	if(size != 1){
+		return -1;
+	}
+
+	/* used only first five bits, others are only padding*/
+	*data = leds;
+	return EOK;
+}
+
+/**
  * @}
  */
