Index: uspace/srv/console/console.c
===================================================================
--- uspace/srv/console/console.c	(revision 1313ee92979dd133fd0dd0717213410aada3df10)
+++ uspace/srv/console/console.c	(revision 62e1e1d7be8247f41f632d147bf155f2520e4c12)
@@ -50,4 +50,6 @@
 #include <event.h>
 #include <devmap.h>
+#include <fcntl.h>
+#include <vfs/vfs.h>
 #include <fibril_synch.h>
 
@@ -665,18 +667,23 @@
 }
 
-static bool console_init(void)
-{
-	ipcarg_t color_cap;
-
-	/* Connect to keyboard driver */
-	kbd_phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_KEYBOARD, 0, 0);
+static bool console_init(char *input)
+{
+	/* Connect to input device */
+	int input_fd = open(input, O_RDONLY);
+	if (input_fd < 0) {
+		printf(NAME ": Failed opening %s\n", input);
+		return false;
+	}
+	
+	kbd_phone = fd_phone(input_fd);
 	if (kbd_phone < 0) {
-		printf(NAME ": Failed to connect to keyboard service\n");
+		printf(NAME ": Failed to connect to input device\n");
 		return false;
 	}
 	
+	/* NB: The callback connection is slotted for removal */
 	ipcarg_t phonehash;
 	if (ipc_connect_to_me(kbd_phone, SERVICE_CONSOLE, 0, 0, &phonehash) != 0) {
-		printf(NAME ": Failed to create callback from keyboard service\n");
+		printf(NAME ": Failed to create callback from input device\n");
 		return false;
 	}
@@ -702,4 +709,5 @@
 	
 	/* Synchronize, the gcons could put something in queue */
+	ipcarg_t color_cap;
 	async_req_0_0(fb_info.phone, FB_FLUSH);
 	async_req_0_2(fb_info.phone, FB_GET_CSIZE, &fb_info.cols, &fb_info.rows);
@@ -771,9 +779,19 @@
 }
 
+static void usage(void)
+{
+	printf("Usage: console <input>\n");
+}
+
 int main(int argc, char *argv[])
 {
+	if (argc < 2) {
+		usage();
+		return -1;
+	}
+	
 	printf(NAME ": HelenOS Console service\n");
 	
-	if (!console_init())
+	if (!console_init(argv[1]))
 		return -1;
 	
Index: uspace/srv/kbd/generic/kbd.c
===================================================================
--- uspace/srv/kbd/generic/kbd.c	(revision 1313ee92979dd133fd0dd0717213410aada3df10)
+++ uspace/srv/kbd/generic/kbd.c	(revision 62e1e1d7be8247f41f632d147bf155f2520e4c12)
@@ -50,4 +50,5 @@
 #include <io/console.h>
 #include <io/keycode.h>
+#include <devmap.h>
 
 #include <kbd.h>
@@ -56,7 +57,7 @@
 #include <layout.h>
 
-#define NAME "kbd"
-
-int cons_connected = 0;
+#define NAME       "kbd"
+#define NAMESPACE  "hid_in"
+
 int phone2cons = -1;
 
@@ -172,9 +173,4 @@
 	int retval;
 
-	if (cons_connected) {
-		ipc_answer_0(iid, ELIMIT);
-		return;
-	}
-	cons_connected = 1;
 	ipc_answer_0(iid, EOK);
 
@@ -183,7 +179,9 @@
 		switch (IPC_GET_METHOD(call)) {
 		case IPC_M_PHONE_HUNGUP:
-			cons_connected = 0;
-			ipc_hangup(phone2cons);
-			phone2cons = -1;
+			if (phone2cons != -1) {
+				ipc_hangup(phone2cons);
+				phone2cons = -1;
+			}
+			
 			ipc_answer_0(callid, EOK);
 			return;
@@ -216,6 +214,4 @@
 	printf(NAME ": HelenOS Keyboard service\n");
 	
-	ipcarg_t phonead;
-	
 	if (sysinfo_value("kbd.cir.fhc") == 1)
 		cir_service = SERVICE_FHC;
@@ -241,10 +237,20 @@
 	layout[active_layout]->reset();
 	
-	async_set_client_connection(console_connection);
-
-	/* Register service at nameserver. */
-	if (ipc_connect_to_me(PHONE_NS, SERVICE_KEYBOARD, 0, 0, &phonead) != 0)
-		return -1;
-	
+	/* Register driver */
+	int rc = devmap_driver_register(NAME, console_connection);
+	if (rc < 0) {
+		printf(NAME ": Unable to register driver (%d)\n", rc);
+		return -1;
+	}
+	
+	char kbd[DEVMAP_NAME_MAXLEN + 1];
+	snprintf(kbd, DEVMAP_NAME_MAXLEN, "%s/%s", NAMESPACE, NAME);
+	
+	dev_handle_t dev_handle;
+	if (devmap_device_register(kbd, &dev_handle) != EOK) {
+		printf(NAME ": Unable to register device %s\n", kbd);
+		return -1;
+	}
+
 	printf(NAME ": Accepting connections\n");
 	async_manager();
