From 134ce2e493882ce411d17ea97ebb243a7d574144 Mon Sep 17 00:00:00 2001 From: Sascha Hlusiak Date: Tue, 19 Feb 2008 21:12:36 +0100 Subject: 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. --- src/evdev_key.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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; } -- cgit v1.2.3