summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSascha Hlusiak <saschahlusiak@arcor.de>2008-02-19 21:12:36 +0100
committerSascha Hlusiak <saschahlusiak@arcor.de>2008-02-19 21:12:36 +0100
commit134ce2e493882ce411d17ea97ebb243a7d574144 (patch)
tree552c558aa16eda768c08906cdd7591c433d4131a
parent10e7c3fbdf4e94c212c0807844721064e7490729 (diff)
Set repeat_delay and repeat_interval to default values
Set ctrls->repeat_delay and ctrls->repeat_interval so that keys will be automatically repeated in software.
-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;
}