Index: uspace/lib/c/generic/io/console.c
===================================================================
--- uspace/lib/c/generic/io/console.c	(revision 07b7c48db097d0b27a33d03332ecd39ea551a2b9)
+++ uspace/lib/c/generic/io/console.c	(revision db71e2af5cdfe169de296e6f39b3e5eda7a966f6)
@@ -154,15 +154,40 @@
 }
 
+static int console_ev_decode(ipc_call_t *call, cons_event_t *event)
+{
+	event->type = IPC_GET_ARG1(*call);
+
+	switch (event->type) {
+	case CEV_KEY:
+		event->ev.key.type = IPC_GET_ARG2(*call);
+		event->ev.key.key = IPC_GET_ARG3(*call);
+		event->ev.key.mods = IPC_GET_ARG4(*call);
+		event->ev.key.c = IPC_GET_ARG5(*call);
+		break;
+	case CEV_POS:
+		event->ev.pos.pos_id = IPC_GET_ARG2(*call) >> 16;
+		event->ev.pos.type = IPC_GET_ARG2(*call) & 0xffff;
+		event->ev.pos.btn_num = IPC_GET_ARG3(*call);
+		event->ev.pos.hpos = IPC_GET_ARG4(*call);
+		event->ev.pos.vpos = IPC_GET_ARG5(*call);
+		break;
+	default:
+		return EIO;
+	}
+
+	return EOK;
+}
+
 bool console_get_event(console_ctrl_t *ctrl, cons_event_t *event)
 {
 	if (ctrl->input_aid == 0) {
-		sysarg_t type;
-		sysarg_t key;
-		sysarg_t mods;
-		sysarg_t c;
+		ipc_call_t result;
 		
 		async_exch_t *exch = async_exchange_begin(ctrl->input_sess);
-		int rc = async_req_0_4(exch, CONSOLE_GET_EVENT, &type, &key, &mods, &c);
+		aid_t aid = async_send_0(exch, CONSOLE_GET_EVENT, &result);
 		async_exchange_end(exch);
+		
+		sysarg_t rc;
+		async_wait_for(aid, &rc);
 		
 		if (rc != EOK) {
@@ -171,9 +196,9 @@
 		}
 		
-		event->type = CEV_KEY;
-		event->ev.key.type = type;
-		event->ev.key.key = key;
-		event->ev.key.mods = mods;
-		event->ev.key.c = c;
+		rc = console_ev_decode(&result, event);
+		if (rc != EOK) {
+			errno = rc;
+			return false;
+		}
 	} else {
 		sysarg_t retval;
@@ -187,9 +212,9 @@
 		}
 		
-		event->type = CEV_KEY;
-		event->ev.key.type = IPC_GET_ARG1(ctrl->input_call);
-		event->ev.key.key = IPC_GET_ARG2(ctrl->input_call);
-		event->ev.key.mods = IPC_GET_ARG3(ctrl->input_call);
-		event->ev.key.c = IPC_GET_ARG4(ctrl->input_call);
+		int rc = console_ev_decode(&ctrl->input_call, event);
+		if (rc != EOK) {
+			errno = rc;
+			return false;
+		}
 	}
 	
@@ -225,9 +250,9 @@
 	}
 	
-	event->type = CEV_KEY;
-	event->ev.key.type = IPC_GET_ARG1(ctrl->input_call);
-	event->ev.key.key = IPC_GET_ARG2(ctrl->input_call);
-	event->ev.key.mods = IPC_GET_ARG3(ctrl->input_call);
-	event->ev.key.c = IPC_GET_ARG4(ctrl->input_call);
+	rc = console_ev_decode(&ctrl->input_call, event);
+	if (rc != EOK) {
+		errno = rc;
+		return false;
+	}
 	
 	/* Update timeout */
