summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/evdev_key.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/evdev_key.c b/src/evdev_key.c
index ed3890c..9fd7dbb 100644
--- a/src/evdev_key.c
+++ b/src/evdev_key.c
@@ -75,6 +75,10 @@
#define MODEFLAG 8
#define COMPOSEFLAG 16
+/* Exported by xorg-server, xkb/xkbAccessX.c */
+extern int XkbDfltRepeatDelay;
+extern int XkbDfltRepeatInterval;
+
/* FIXME: this map works with evdev keyboards, but all the xkb maps
* probably don't. The easiest is to remap the event keycodes. */
@@ -411,6 +415,18 @@ EvdevKeyInit (DeviceIntPtr device)
XkbInitKeyboardDeviceStruct (device, &state->key->xkbnames, &keySyms, modMap,
NULL, EvdevKbdCtrl);
+
+ if (device->key &&
+ device->key->xkbInfo &&
+ device->key->xkbInfo->desc &&
+ device->key->xkbInfo->desc->ctrls)
+ {
+ XkbControlsPtr ctrls = device->key->xkbInfo->desc->ctrls;
+ ctrls->repeat_delay = XkbDfltRepeatDelay;
+ ctrls->repeat_interval = XkbDfltRepeatInterval;
+ }
+
+
return Success;
}