Index: uspace/drv/usbhid/generic/hiddev.c
===================================================================
--- uspace/drv/usbhid/generic/hiddev.c	(revision 6c6a95d279d3b6dc66db477ee34aa127ededb6c8)
+++ uspace/drv/usbhid/generic/hiddev.c	(revision 1ce4189d8c20ad8d4f1155c953fc3e12908ce6f1)
@@ -39,4 +39,5 @@
 #include <errno.h>
 #include <str_error.h>
+#include <bool.h>
 
 #include <usbhid_iface.h>
@@ -64,4 +65,6 @@
     size_t size, size_t *act_size, unsigned int flags);
 
+static int usb_generic_hid_client_connected(ddf_fun_t *fun);
+
 /*----------------------------------------------------------------------------*/
 
@@ -72,5 +75,6 @@
 
 static ddf_dev_ops_t usb_generic_hid_ops = {
-	.interfaces[USBHID_DEV_IFACE] = &usb_generic_iface
+	.interfaces[USBHID_DEV_IFACE] = &usb_generic_iface,
+	.open = usb_generic_hid_client_connected
 };
 
@@ -104,10 +108,25 @@
 	
 	/*! @todo This should probably be atomic. */
-	memcpy(buffer, hid_dev->input_report, hid_dev->input_report_size);
-	*act_size = hid_dev->input_report_size;
+	if (usb_hid_report_ready()) {
+		memcpy(buffer, hid_dev->input_report, 
+		    hid_dev->input_report_size);
+		*act_size = hid_dev->input_report_size;
+		usb_hid_report_received();
+	}
 	
 	// clear the buffer so that it will not be received twice
-	memset(hid_dev->input_report, 0, hid_dev->input_report_size);
+	//memset(hid_dev->input_report, 0, hid_dev->input_report_size);
 	
+	// note that we already received this report
+//	report_received = true;
+	
+	return EOK;
+}
+
+/*----------------------------------------------------------------------------*/
+
+static int usb_generic_hid_client_connected(ddf_fun_t *fun)
+{
+	usb_hid_report_received();
 	return EOK;
 }
Index: uspace/drv/usbhid/kbd/kbddev.c
===================================================================
--- uspace/drv/usbhid/kbd/kbddev.c	(revision 6c6a95d279d3b6dc66db477ee34aa127ededb6c8)
+++ uspace/drv/usbhid/kbd/kbddev.c	(revision 1ce4189d8c20ad8d4f1155c953fc3e12908ce6f1)
@@ -255,4 +255,6 @@
 	
 	if (hid_dev == NULL || hid_dev->data == NULL) {
+		usb_log_debug("default_connection_handler: "
+		    "Missing parameter.\n");
 		async_answer_0(icallid, EINVAL);
 		return;
@@ -267,4 +269,6 @@
 
 		if (kbd_dev->console_phone != -1) {
+			usb_log_debug("default_connection_handler: "
+			    "console phone already set\n");
 			async_answer_0(icallid, ELIMIT);
 			return;
@@ -272,8 +276,11 @@
 
 		kbd_dev->console_phone = callback;
+		
+		usb_log_debug("default_connection_handler: OK\n");
 		async_answer_0(icallid, EOK);
 		return;
 	}
 	
+	usb_log_debug("default_connection_handler: Wrong function.\n");
 	async_answer_0(icallid, EINVAL);
 }
Index: uspace/drv/usbhid/mouse/mousedev.c
===================================================================
--- uspace/drv/usbhid/mouse/mousedev.c	(revision 6c6a95d279d3b6dc66db477ee34aa127ededb6c8)
+++ uspace/drv/usbhid/mouse/mousedev.c	(revision 1ce4189d8c20ad8d4f1155c953fc3e12908ce6f1)
@@ -43,4 +43,8 @@
 #include <str_error.h>
 #include <ipc/mouse.h>
+#include <io/console.h>
+
+#include <ipc/kbd.h>
+#include <io/keycode.h>
 
 #include "mousedev.h"
@@ -61,5 +65,7 @@
 
 const char *HID_MOUSE_FUN_NAME = "mouse";
+const char *HID_MOUSE_WHEEL_FUN_NAME = "mouse-wheel";
 const char *HID_MOUSE_CLASS_NAME = "mouse";
+const char *HID_MOUSE_WHEEL_CLASS_NAME = "keyboard";
 
 /** Default idle rate for mouses. */
@@ -119,4 +125,6 @@
 	
 	if (hid_dev == NULL || hid_dev->data == NULL) {
+		usb_log_debug("default_connection_handler: Missing "
+		    "parameters.\n");
 		async_answer_0(icallid, EINVAL);
 		return;
@@ -127,13 +135,19 @@
 	usb_mouse_t *mouse_dev = (usb_mouse_t *)hid_dev->data;
 	
+	int *phone = (str_cmp(fun->name, HID_MOUSE_FUN_NAME) == 0) 
+		     ? &mouse_dev->mouse_phone : &mouse_dev->wheel_phone;
+	
 	if (method == IPC_M_CONNECT_TO_ME) {
 		int callback = IPC_GET_ARG5(*icall);
 
-		if (mouse_dev->console_phone != -1) {
+		if (*phone != -1) {
+			usb_log_debug("default_connection_handler: Console "
+			    "phone to mouse already set.\n");
 			async_answer_0(icallid, ELIMIT);
+			//async_answer_0(icallid, EOK);
 			return;
 		}
 
-		mouse_dev->console_phone = callback;
+		*phone = callback;
 		usb_log_debug("Console phone to mouse set ok (%d).\n", callback);
 		async_answer_0(icallid, EOK);
@@ -141,4 +155,5 @@
 	}
 
+	usb_log_debug("default_connection_handler: Invalid function.\n");
 	async_answer_0(icallid, EINVAL);
 }
@@ -152,5 +167,6 @@
 		return NULL;
 	}
-	mouse->console_phone = -1;
+	mouse->mouse_phone = -1;
+	mouse->wheel_phone = -1;
 	
 	return mouse;
@@ -164,6 +180,10 @@
 	
 	// hangup phone to the console
-	if ((*mouse_dev)->console_phone >= 0) {
-		async_hangup((*mouse_dev)->console_phone);
+	if ((*mouse_dev)->mouse_phone >= 0) {
+		async_hangup((*mouse_dev)->mouse_phone);
+	}
+	
+	if ((*mouse_dev)->wheel_phone >= 0) {
+		async_hangup((*mouse_dev)->wheel_phone);
 	}
 	
@@ -174,6 +194,36 @@
 /*----------------------------------------------------------------------------*/
 
-static bool usb_mouse_process_boot_report(usb_hid_dev_t *hid_dev,
-    uint8_t *buffer, size_t buffer_size)
+static void usb_mouse_send_wheel(const usb_mouse_t *mouse_dev, int wheel)
+{
+	console_event_t ev;
+	
+	ev.type = KEY_PRESS;
+	ev.key = (wheel > 0) ? KC_UP : (wheel < 0) ? KC_DOWN : 0;
+	ev.mods = 0;
+	ev.c = 0;
+
+	if (mouse_dev->wheel_phone < 0) {
+		usb_log_warning(
+		    "Connection to console not ready, key discarded.\n");
+		return;
+	}
+	
+	int count = (wheel < 0) ? -wheel : wheel;
+	int i;
+	
+	for (i = 0; i < count * 3; ++i) {
+		usb_log_debug2("Sending key %d to the console\n", ev.key);
+		async_msg_4(mouse_dev->wheel_phone, KBD_EVENT, ev.type, 
+		    ev.key, ev.mods, ev.c);
+		// send key release right away
+		async_msg_4(mouse_dev->wheel_phone, KBD_EVENT, KEY_RELEASE, 
+		    ev.key, ev.mods, ev.c);
+	}
+}
+
+/*----------------------------------------------------------------------------*/
+
+static bool usb_mouse_process_report(usb_hid_dev_t *hid_dev, uint8_t *buffer,
+    size_t buffer_size)
 {
 	usb_mouse_t *mouse_dev = (usb_mouse_t *)hid_dev->data;
@@ -182,5 +232,5 @@
 	    usb_debug_str_buffer(buffer, buffer_size, 0));
 	
-	if (mouse_dev->console_phone < 0) {
+	if (mouse_dev->mouse_phone < 0) {
 		usb_log_error(NAME " No console phone.\n");
 		return false;	// ??
@@ -252,7 +302,35 @@
 	
 	if ((shift_x != 0) || (shift_y != 0)) {
-		async_req_2_0(mouse_dev->console_phone,
+		async_req_2_0(mouse_dev->mouse_phone,
 		    MEVENT_MOVE, shift_x, shift_y);
 	}
+	
+	/*
+	 * Wheel
+	 */
+	int wheel;
+	
+	path = usb_hid_report_path();
+	usb_hid_report_path_append_item(path, USB_HIDUT_PAGE_GENERIC_DESKTOP, 
+	    USB_HIDUT_USAGE_GENERIC_DESKTOP_WHEEL);
+
+	usb_hid_report_path_set_report_id(path, report_id);
+	
+	field = usb_hid_report_get_sibling(
+	    hid_dev->report, NULL, path, USB_HID_PATH_COMPARE_END, 
+	    USB_HID_REPORT_TYPE_INPUT);
+
+	if (field != NULL) {
+		usb_log_debug(NAME " VALUE(%X) USAGE(%X)\n", field->value, 
+		    field->usage);
+		wheel = field->value;
+	}
+
+	usb_hid_report_path_free(path);
+	
+	// send arrow up for positive direction and arrow down for negative
+	// direction; three arrows for difference of 1
+	usb_mouse_send_wheel(mouse_dev, wheel);
+	
 	
 	/*
@@ -274,5 +352,5 @@
 		if (mouse_dev->buttons[field->usage - field->usage_minimum] == 0
 		    && field->value != 0) {
-			async_req_2_0(mouse_dev->console_phone,
+			async_req_2_0(mouse_dev->mouse_phone,
 			    MEVENT_BUTTON, field->usage, 1);
 			mouse_dev->buttons[field->usage - field->usage_minimum]
@@ -281,5 +359,5 @@
 		    mouse_dev->buttons[field->usage - field->usage_minimum] != 0
 		    && field->value == 0) {
-		       async_req_2_0(mouse_dev->console_phone,
+		       async_req_2_0(mouse_dev->mouse_phone,
 			   MEVENT_BUTTON, field->usage, 0);
 		       mouse_dev->buttons[field->usage - field->usage_minimum]
@@ -337,4 +415,42 @@
 	}
 	
+	/*
+	 * Special function for acting as keyboard (wheel)
+	 */
+	usb_log_debug("Creating DDF function %s...\n", 
+	              HID_MOUSE_WHEEL_FUN_NAME);
+	fun = ddf_fun_create(hid_dev->usb_dev->ddf_dev, fun_exposed, 
+	    HID_MOUSE_WHEEL_FUN_NAME);
+	if (fun == NULL) {
+		usb_log_error("Could not create DDF function node.\n");
+		return ENOMEM;
+	}
+	
+	/*
+	 * Store the initialized HID device and HID ops
+	 * to the DDF function.
+	 */
+	fun->ops = &hid_dev->ops;
+	fun->driver_data = hid_dev;   // TODO: maybe change to hid_dev->data
+
+	rc = ddf_fun_bind(fun);
+	if (rc != EOK) {
+		usb_log_error("Could not bind DDF function: %s.\n",
+		    str_error(rc));
+		ddf_fun_destroy(fun);
+		return rc;
+	}
+	
+	usb_log_debug("Adding DDF function to class %s...\n", 
+	    HID_MOUSE_WHEEL_CLASS_NAME);
+	rc = ddf_fun_add_to_class(fun, HID_MOUSE_WHEEL_CLASS_NAME);
+	if (rc != EOK) {
+		usb_log_error(
+		    "Could not add DDF function to class %s: %s.\n",
+		    HID_MOUSE_WHEEL_CLASS_NAME, str_error(rc));
+		ddf_fun_destroy(fun);
+		return rc;
+	}
+	
 	return EOK;
 }
@@ -407,5 +523,5 @@
 	}
 	
-	return usb_mouse_process_boot_report(hid_dev, buffer, buffer_size);
+	return usb_mouse_process_report(hid_dev, buffer, buffer_size);
 }
 
Index: uspace/drv/usbhid/mouse/mousedev.h
===================================================================
--- uspace/drv/usbhid/mouse/mousedev.h	(revision 6c6a95d279d3b6dc66db477ee34aa127ededb6c8)
+++ uspace/drv/usbhid/mouse/mousedev.h	(revision 1ce4189d8c20ad8d4f1155c953fc3e12908ce6f1)
@@ -48,5 +48,6 @@
 	//suseconds_t poll_interval_us;
 	/** IPC phone to console (consumer). */
-	int console_phone;
+	int mouse_phone;
+	int wheel_phone;
 	
 	int32_t *buttons;
Index: uspace/drv/usbhid/subdrivers.c
===================================================================
--- uspace/drv/usbhid/subdrivers.c	(revision 6c6a95d279d3b6dc66db477ee34aa127ededb6c8)
+++ uspace/drv/usbhid/subdrivers.c	(revision 1ce4189d8c20ad8d4f1155c953fc3e12908ce6f1)
@@ -36,9 +36,23 @@
 #include "subdrivers.h"
 #include "usb/classes/hidut.h"
+#include "usb/classes/hidpath.h"
 
 #include "lgtch-ultrax/lgtch-ultrax.h"
+#include "mouse/mousedev.h"
 
 static usb_hid_subdriver_usage_t path_kbd[] = {
 	{USB_HIDUT_PAGE_KEYBOARD, 0}, 
+	{0, 0}
+};
+
+static usb_hid_subdriver_usage_t path_mouse[] = {
+	{USB_HIDUT_PAGE_GENERIC_DESKTOP, USB_HIDUT_USAGE_GENERIC_DESKTOP_MOUSE},
+	{USB_HIDUT_PAGE_GENERIC_DESKTOP, 
+	 USB_HIDUT_USAGE_GENERIC_DESKTOP_POINTER},
+	{0, 0}
+};
+
+static usb_hid_subdriver_usage_t path_mouse2[] = {
+	{USB_HIDUT_PAGE_GENERIC_DESKTOP, USB_HIDUT_USAGE_GENERIC_DESKTOP_X},
 	{0, 0}
 };
@@ -79,4 +93,31 @@
 		}
 	},
+	{
+		path_mouse,
+		-1,
+		USB_HID_PATH_COMPARE_COLLECTION_ONLY,
+		-1,
+		-1,
+		{
+			.init = usb_mouse_init,
+			.deinit = usb_mouse_deinit,
+			.poll = usb_mouse_polling_callback,
+			.poll_end = NULL
+		}
+	},
+	{
+		path_mouse2,
+		-1,
+		USB_HID_PATH_COMPARE_END 
+		| USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY,
+		-1,
+		-1,
+		{
+			.init = usb_mouse_init,
+			.deinit = usb_mouse_deinit,
+			.poll = usb_mouse_polling_callback,
+			.poll_end = NULL
+		}
+	},
 	{NULL, -1, 0, -1, -1, {NULL, NULL, NULL, NULL}}
 };
Index: uspace/drv/usbhid/usbhid.c
===================================================================
--- uspace/drv/usbhid/usbhid.c	(revision 6c6a95d279d3b6dc66db477ee34aa127ededb6c8)
+++ uspace/drv/usbhid/usbhid.c	(revision 1ce4189d8c20ad8d4f1155c953fc3e12908ce6f1)
@@ -63,4 +63,6 @@
 static const int USB_HID_MAX_SUBDRIVERS = 10;
 
+static fibril_local bool report_received;
+
 /*----------------------------------------------------------------------------*/
 
@@ -412,7 +414,5 @@
 	}
 	
-	// TODO: remove the mouse hack
-	if (hid_dev->poll_pipe_index == USB_HID_MOUSE_POLL_EP_NO ||
-	    fallback) {
+	if (fallback) {
 		// fall back to boot protocol
 		switch (hid_dev->poll_pipe_index) {
@@ -509,4 +509,5 @@
 				free(input_old);
 			}
+			usb_hid_new_report();
 		}
 	}
@@ -589,4 +590,25 @@
 /*----------------------------------------------------------------------------*/
 
+void usb_hid_new_report(void)
+{
+	report_received = false;
+}
+
+/*----------------------------------------------------------------------------*/
+
+void usb_hid_report_received(void)
+{
+	report_received = true;
+}
+
+/*----------------------------------------------------------------------------*/
+
+bool usb_hid_report_ready(void)
+{
+	return !report_received;
+}
+
+/*----------------------------------------------------------------------------*/
+
 void usb_hid_free(usb_hid_dev_t **hid_dev)
 {
Index: uspace/drv/usbhid/usbhid.h
===================================================================
--- uspace/drv/usbhid/usbhid.h	(revision 6c6a95d279d3b6dc66db477ee34aa127ededb6c8)
+++ uspace/drv/usbhid/usbhid.h	(revision 1ce4189d8c20ad8d4f1155c953fc3e12908ce6f1)
@@ -44,4 +44,5 @@
 #include <usb/devdrv.h>
 #include <usb/classes/hid.h>
+#include <bool.h>
 
 struct usb_hid_dev;
@@ -128,4 +129,10 @@
 //const char *usb_hid_get_class_name(const usb_hid_dev_t *hid_dev);
 
+void usb_hid_new_report(void);
+
+void usb_hid_report_received(void);
+
+bool usb_hid_report_ready(void);
+
 void usb_hid_free(usb_hid_dev_t **hid_dev);
 
