diff options
author | Thomas Klausner <wiz@NetBSD.org> | 2013-07-29 23:23:45 +0200 |
---|---|---|
committer | Gaetan Nadon <memsize@videotron.ca> | 2013-10-18 16:41:13 -0400 |
commit | 390c4621dd4e2f6070508796385e2d23e5418b89 (patch) | |
tree | 925223e6a72a435ca754a27a81db7b0eaebfef52 | |
parent | 8ac42401a6db161e0983df17ac1787f164faf2f3 (diff) | |
download | xorg-driver-xf86-input-keyboard-390c4621dd4e2f6070508796385e2d23e5418b89.tar.gz |
Improve auto-detection.
If WSKBDIO_GTYPE succeeds and returns type=0, it is a mux with no
keyboard attached. In this case, assume USB.
>From Jared McNeill <jmcneill@NetBSD.org>
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-rw-r--r-- | src/bsd_kbd.c | 6 |
1 files changed, 6 insertions, 0 deletions
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; |