Index: uspace/srv/hid/input/layout.h
===================================================================
--- uspace/srv/hid/input/layout.h	(revision 3e1bc3546ea213729dee23c73de611ea2141e305)
+++ uspace/srv/hid/input/layout.h	(revision 8f16ede69cf1555cad1fe83622ab79a4d147956f)
@@ -57,4 +57,5 @@
 
 extern layout_ops_t layout_default;
+extern layout_ops_t layout_active;
 
 extern layout_t *layout_create(layout_ops_t *);
Index: uspace/srv/hid/input/layout/Makefile
===================================================================
--- uspace/srv/hid/input/layout/Makefile	(revision 3e1bc3546ea213729dee23c73de611ea2141e305)
+++ uspace/srv/hid/input/layout/Makefile	(revision 8f16ede69cf1555cad1fe83622ab79a4d147956f)
@@ -6,11 +6,13 @@
 all:
 	$(foreach LAYOUT,$(LAYOUTS), $(MAKE) -f Makefile.helper LAYOUT=$(LAYOUT) $@;)
-	
+	$(foreach LAYOUT,$(LAYOUTS), cp -p $(LAYOUT).so.0.0 $(LAYOUT).so;)
 
 clean:
 	$(foreach LAYOUT,$(LAYOUTS), $(MAKE) -f Makefile.helper LAYOUT=$(LAYOUT) $@;)
+	rm *.so
 
 fasterclean:
 	$(foreach LAYOUT,$(LAYOUTS), $(MAKE) -f Makefile.helper LAYOUT=$(LAYOUT) $@;)
+	rm *.so
 
 all-test:
Index: uspace/srv/hid/input/layout/Makefile.helper
===================================================================
--- uspace/srv/hid/input/layout/Makefile.helper	(revision 3e1bc3546ea213729dee23c73de611ea2141e305)
+++ uspace/srv/hid/input/layout/Makefile.helper	(revision 8f16ede69cf1555cad1fe83622ab79a4d147956f)
@@ -6,3 +6,5 @@
 SOURCES = $(LAYOUT).c
 
+EXTRA_CFLAGS = -DCONFIG_KB_LAYOUT_EXTERNAL
+
 include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/hid/input/layout/ar.c
===================================================================
--- uspace/srv/hid/input/layout/ar.c	(revision 3e1bc3546ea213729dee23c73de611ea2141e305)
+++ uspace/srv/hid/input/layout/ar.c	(revision 8f16ede69cf1555cad1fe83622ab79a4d147956f)
@@ -36,4 +36,8 @@
  */
 
+#if !(defined(CONFIG_KB_LAYOUT_EXTERNAL) || defined(CONFIG_KB_LAYOUT_ar))
+#error Invalid configuration of CONFIG_KB_LAYOUT
+#else
+
 #include <errno.h>
 #include <io/console.h>
@@ -46,7 +50,5 @@
 static wchar_t ar_parse_ev(layout_t *, kbd_event_t *ev);
 
-#ifdef CONFIG_KB_LAYOUT_ar
-
-layout_ops_t layout_default = {
+static const layout_ops_t layout_intern = {
 	.create = ar_create,
 	.destroy = ar_destroy,
@@ -54,16 +56,13 @@
 };
 
-#else
-
+#ifdef CONFIG_KB_LAYOUT_EXTERNAL
 layout_ops_t get_layout(void);
-layout_ops_t get_layout(void) {
-	layout_ops_t layout_default = {
-		.create = ar_create,
-		.destroy = ar_destroy,
-		.parse_ev = ar_parse_ev
-	};
-	return layout_default;
-}
-
+layout_ops_t get_layout(void)
+{
+	return layout_intern;
+}
+#else 
+layout_ops_t layout_default = layout_intern;
+layout_ops_t layout_active = layout_intern;
 #endif
 
@@ -256,4 +255,6 @@
 }
 
+#endif
+
 /**
  * @}
Index: uspace/srv/hid/input/layout/cz.c
===================================================================
--- uspace/srv/hid/input/layout/cz.c	(revision 3e1bc3546ea213729dee23c73de611ea2141e305)
+++ uspace/srv/hid/input/layout/cz.c	(revision 8f16ede69cf1555cad1fe83622ab79a4d147956f)
@@ -35,4 +35,8 @@
  */
 
+#if !(defined(CONFIG_KB_LAYOUT_EXTERNAL) || defined(CONFIG_KB_LAYOUT_cz))
+#error Invalid configuration of CONFIG_KB_LAYOUT
+#else
+
 #include <errno.h>
 #include <io/console.h>
@@ -47,4 +51,21 @@
 static wchar_t cz_parse_ev(layout_t *, kbd_event_t *ev);
 
+static const layout_ops_t layout_intern = {
+	.create = cz_create,
+	.destroy = cz_destroy,
+	.parse_ev = cz_parse_ev
+};
+
+#ifdef CONFIG_KB_LAYOUT_EXTERNAL
+layout_ops_t get_layout(void);
+layout_ops_t get_layout(void)
+{
+	return layout_intern;
+}
+#else 
+layout_ops_t layout_default = layout_intern;
+layout_ops_t layout_active = layout_intern;
+#endif
+
 enum m_state {
 	ms_start,
@@ -56,26 +77,4 @@
 	enum m_state mstate;
 } layout_cz_t;
-
-#ifdef CONFIG_KB_LAYOUT_cz
-
-layout_ops_t layout_default = {
-	.create = cz_create,
-	.destroy = cz_destroy,
-	.parse_ev = cz_parse_ev
-};
-
-#else
-
-layout_ops_t get_layout(void);
-layout_ops_t get_layout(void) {
-	layout_ops_t layout_default = {
-		.create = cz_create,
-		.destroy = cz_destroy,
-		.parse_ev = cz_parse_ev
-	};
-	return layout_default;
-}
-
-#endif
 
 static wchar_t map_lcase[] = {
@@ -447,4 +446,6 @@
 }
 
+#endif
+
 /**
  * @}
Index: uspace/srv/hid/input/layout/us_dvorak.c
===================================================================
--- uspace/srv/hid/input/layout/us_dvorak.c	(revision 3e1bc3546ea213729dee23c73de611ea2141e305)
+++ uspace/srv/hid/input/layout/us_dvorak.c	(revision 8f16ede69cf1555cad1fe83622ab79a4d147956f)
@@ -35,4 +35,8 @@
  */
 
+#if !(defined(CONFIG_KB_LAYOUT_EXTERNAL) || defined(CONFIG_KB_LAYOUT_us_dvorak))
+#error Invalid configuration of CONFIG_KB_LAYOUT
+#else
+
 #include <errno.h>
 #include <io/console.h>
@@ -45,7 +49,5 @@
 static wchar_t us_dvorak_parse_ev(layout_t *, kbd_event_t *ev);
 
-#ifdef CONFIG_KB_LAYOUT_us_dvorak
-
-layout_ops_t layout_default = {
+static const layout_ops_t layout_intern = {
 	.create = us_dvorak_create,
 	.destroy = us_dvorak_destroy,
@@ -53,16 +55,13 @@
 };
 
-#else
-
+#ifdef CONFIG_KB_LAYOUT_EXTERNAL
 layout_ops_t get_layout(void);
-layout_ops_t get_layout(void) {
-	layout_ops_t layout_default = {
-		.create = us_dvorak_create,
-		.destroy = us_dvorak_destroy,
-		.parse_ev = us_dvorak_parse_ev
-	};
-	return layout_default;
-}
-
+layout_ops_t get_layout(void)
+{
+	return layout_intern;
+}
+#else 
+layout_ops_t layout_default = layout_intern;
+layout_ops_t layout_active = layout_intern;
 #endif
 
@@ -273,4 +272,6 @@
 }
 
+#endif
+
 /**
  * @}
Index: uspace/srv/hid/input/layout/us_qwerty.c
===================================================================
--- uspace/srv/hid/input/layout/us_qwerty.c	(revision 3e1bc3546ea213729dee23c73de611ea2141e305)
+++ uspace/srv/hid/input/layout/us_qwerty.c	(revision 8f16ede69cf1555cad1fe83622ab79a4d147956f)
@@ -35,4 +35,8 @@
  */
 
+#if !(defined(CONFIG_KB_LAYOUT_EXTERNAL) || defined(CONFIG_KB_LAYOUT_us_qwerty))
+#error Invalid configuration of CONFIG_KB_LAYOUT
+#else
+
 #include <errno.h>
 #include <io/console.h>
@@ -45,7 +49,5 @@
 static wchar_t us_qwerty_parse_ev(layout_t *, kbd_event_t *ev);
 
-#ifdef CONFIG_KB_LAYOUT_us_qwerty
-
-layout_ops_t layout_default = {
+static const layout_ops_t layout_intern = {
 	.create = us_qwerty_create,
 	.destroy = us_qwerty_destroy,
@@ -53,16 +55,13 @@
 };
 
-#else
-
+#ifdef CONFIG_KB_LAYOUT_EXTERNAL
 layout_ops_t get_layout(void);
-layout_ops_t get_layout(void) {
-	layout_ops_t layout_default = {
-		.create = us_qwerty_create,
-		.destroy = us_qwerty_destroy,
-		.parse_ev = us_qwerty_parse_ev
-	};
-	return layout_default;
-}
-
+layout_ops_t get_layout(void)
+{
+	return layout_intern;
+}
+#else 
+layout_ops_t layout_default = layout_intern;
+layout_ops_t layout_active = layout_intern;
 #endif
 
@@ -267,4 +266,6 @@
 }
 
+#endif
+
 /**
  * @}
