If WSKBDIO_GTYPE succeeds and returns type=0, it is a mux with no
keyboard attached. In this case, assume USB.

>From Jared McNeill <[email protected]>
Signed-off-by: Thomas Klausner <[email protected]>
Reviewed-by: Alan Coopersmith <[email protected]>
Reviewed-by: Matthieu Herrb <[email protected]>
---
 src/bsd_kbd.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/bsd_kbd.c b/src/bsd_kbd.c
index d629565..7808d66 100644
--- a/src/bsd_kbd.c
+++ b/src/bsd_kbd.c
@@ -436,6 +436,12 @@ OpenKeyboard(InputInfoPtr pInfo)
            case WSKBD_TYPE_PC_AT:
                printWsType("AT", pInfo->name);
                break;
+           case 0:
+               /* If wsKbdType==0, no keyboard attached to the mux. Assume 
USB. */
+               xf86Msg(X_WARNING, "%s: No keyboard attached, assuming USB\n",
+                                  pInfo->name);
+               pKbd->wsKbdType = WSKBD_TYPE_USB;
+               /* FALLTHROUGH */
            case WSKBD_TYPE_USB:
                printWsType("USB", pInfo->name);
                break;
-- 
1.8.3.3

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to