Is this the right way to setup auto-repeating? I didn't see an
XkbSetRepeatRate or something similar... so is this what I should be
doing, or should I be calling something?
(note that this hunk is immediately after my call to
XkbInitKeyboardDeviceStruct(pDev, ...):
diff --git a/hw/xquartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c
index bc7efdf..2e8ca86 100644
--- a/hw/xquartz/quartzKeyboard.c
+++ b/hw/xquartz/quartzKeyboard.c
@@ -342,7 +342,12 @@ void DarwinKeyboardInit(DeviceIntPtr pDev) {
QuartzBell,
DarwinChangeKeyboardControl));
pthread_mutex_unlock(&keyInfo_mutex);
- SwitchCoreKeyboard(pDev);
+ // Enable autorepeat
+ pDev->key->xkbInfo->desc->ctrls->repeat_delay = 500;
+ pDev->key->xkbInfo->desc->ctrls->repeat_interval = 100;
+ XkbSetRepeatKeys(pDev, -1, AutoRepeatModeOn);
+
+ SwitchCoreKeyboard(pDev);
DarwinKeyboardSetDeviceKeyMap(&keySyms);
}
_______________________________________________
xorg mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/xorg