summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--driver/xf86-input-keyboard/src/bsd_kbd.c11
-rw-r--r--driver/xf86-input-keyboard/src/kbd.c1
2 files changed, 8 insertions, 4 deletions
diff --git a/driver/xf86-input-keyboard/src/bsd_kbd.c b/driver/xf86-input-keyboard/src/bsd_kbd.c
index b981e1289..ef09612f8 100644
--- a/driver/xf86-input-keyboard/src/bsd_kbd.c
+++ b/driver/xf86-input-keyboard/src/bsd_kbd.c
@@ -22,6 +22,7 @@
#include "xf86.h"
#include "xf86Priv.h"
#include "xf86_OSlib.h"
+#include "xf86Parser.h"
#include "xf86Xinput.h"
#include "xf86OSKbd.h"
@@ -59,6 +60,8 @@ struct nameint kbdopt[] = {
extern void KbdGetMapping(InputInfoPtr pInfo, KeySymsPtr pKeySyms,
CARD8 *pModMap);
+extern int priv_open_device(const char *dev);
+
extern Bool VTSwitchEnabled;
static KbdProtocolRec protocols[] = {
@@ -496,8 +499,6 @@ OpenKeyboard(InputInfoPtr pInfo)
* XkbLayout has been specified. Do this even if the protocol is
* not wskbd.
*/
- if (xf86findOption(pInfo->options, "XkbLayout") != NULL)
- return TRUE;
if (ioctl(pInfo->fd, WSKBDIO_GETENCODING, &wsenc) == -1) {
/* Ignore the error, we just use the defaults */
@@ -505,9 +506,11 @@ OpenKeyboard(InputInfoPtr pInfo)
pInfo->name, strerror(errno));
return TRUE;
}
- if (KB_ENCODING(wsenc) == KB_USER)
- /* Don't try to set XkbLayout */
+ if (KB_ENCODING(wsenc) == KB_USER) {
+ /* Ignore wscons "user" layout */
+ xf86Msg(X_INFO, "%s: ignoring \"user\" wscons layout", pInfo->name);
return TRUE;
+ }
for (i = 0; kbdenc[i].val; i++)
if(KB_ENCODING(wsenc) == kbdenc[i].val) {
diff --git a/driver/xf86-input-keyboard/src/kbd.c b/driver/xf86-input-keyboard/src/kbd.c
index c6f119291..1e2981a8e 100644
--- a/driver/xf86-input-keyboard/src/kbd.c
+++ b/driver/xf86-input-keyboard/src/kbd.c
@@ -122,6 +122,7 @@ static const char *kbdDefaults[] = {
"AutoRepeat", "500 30",
"XkbRules", "xorg",
"XkbModel", "pc105",
+ "XkbLayout", "us",
"CustomKeycodes", "off",
NULL
};