-#define MOUSE_INTERFACE 1
-#define CONSOLE_INTERFACE 2
-#define EXTRA_INTERFACE 3
+
+#ifdef MOUSE_ENABLE
+# define MOUSE_INTERFACE (KEYBOARD_INTERFACE + 1)
+#else
+# define MOUSE_INTERFACE KEYBOARD_INTERFACE
+#endif
+
+#ifdef EXTRAKEY_ENABLE
+# define EXTRAKEY_INTERFACE (MOUSE_INTERFACE + 1)
+#else
+# define EXTRAKEY_INTERFACE MOUSE_INTERFACE
+#endif
+
+#ifdef CONSOLE_ENABLE
+# define CONSOLE_INTERFACE (EXTRAKEY_INTERFACE + 1)
+#else
+# define CONSOLE_INTERFACE EXTRAKEY_INTERFACE
+#endif
+
+
+/* nubmer of interfaces */
+#define TOTAL_INTERFACES (CONSOLE_INTERFACE + 1)
+