aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/evdev.c4
-rw-r--r--src/evdev_key.c21
2 files changed, 19 insertions, 6 deletions
diff --git a/src/evdev.c b/src/evdev.c
index 94cb619..dc801d0 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -398,7 +398,9 @@ EvdevPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
pInfo->private = pEvdev;
- pEvdev->device = xf86CheckStrOption(dev->commonOptions, "Device", NULL);
+ pEvdev->device = xf86CheckStrOption(dev->commonOptions, "path", NULL);
+ if (!pEvdev->device)
+ pEvdev->device = xf86CheckStrOption(dev->commonOptions, "Device", NULL);
xf86CollectInputOptions(pInfo, NULL, NULL);
xf86ProcessCommonOptions(pInfo, pInfo->options);
diff --git a/src/evdev_key.c b/src/evdev_key.c
index d278988..eed6319 100644
--- a/src/evdev_key.c
+++ b/src/evdev_key.c
@@ -466,11 +466,22 @@ EvdevKeyNew (InputInfoPtr pInfo)
pInfo->flags |= XI86_KEYBOARD_CAPABLE | XI86_CONFIGURED;
- SetXkbOption (pInfo, "XkbRules", __XKBDEFRULES__, &state->key->xkb_rules);
- SetXkbOption (pInfo, "XkbModel", "evdev", &state->key->xkb_model);
- SetXkbOption (pInfo, "XkbLayout", "us", &state->key->xkb_layout);
- SetXkbOption (pInfo, "XkbVariant", NULL, &state->key->xkb_variant);
- SetXkbOption (pInfo, "XkbOptions", NULL, &state->key->xkb_options);
+ SetXkbOption (pInfo, "xkb_rules", NULL, &state->key->xkb_rules);
+ if (!state->key->xkb_rules)
+ SetXkbOption (pInfo, "XkbRules", __XKBDEFRULES__,
+ &state->key->xkb_rules);
+ SetXkbOption (pInfo, "xkb_model", NULL, &state->key->xkb_model);
+ if (!state->key->xkb_model)
+ SetXkbOption (pInfo, "XkbModel", "evdev", &state->key->xkb_model);
+ SetXkbOption (pInfo, "xkb_layout", NULL, &state->key->xkb_layout);
+ if (!state->key->xkb_layout)
+ SetXkbOption (pInfo, "XkbLayout", "us", &state->key->xkb_layout);
+ SetXkbOption (pInfo, "xkb_variant", NULL, &state->key->xkb_variant);
+ if (!state->key->xkb_variant)
+ SetXkbOption (pInfo, "XkbVariant", NULL, &state->key->xkb_variant);
+ SetXkbOption (pInfo, "xkb_options", NULL, &state->key->xkb_options);
+ if (!state->key->xkb_options)
+ SetXkbOption (pInfo, "XkbOptions", NULL, &state->key->xkb_options);
return Success;
}