Hi Daniel, Am Tuesday 02 December 2008 10:13:50 schrieb Daniel Stone: > On Tue, Dec 02, 2008 at 09:21:33AM +0100, Sascha Hlusiak wrote: > > Please have a look at xkb/ddxCtrls.c @ XkbDDXUsesSoftRepeat. Software > > autorepeat will exactly not happen in the server, if delay is set to 660 > > and rate is set to 25 (interval=40). This is the default setting when > > starting up the server. > > > > Any comments on removing that complete chunk or on setting > > XKB_ALWAYS_USES_SOFT_REPEAT? > > Hi, > XkbDDXUsesSoftRepeat is pretty weird with checking for the AccessX > flags, but based on a quick look at the XkbProcessKeyEvent flow, I think > it's pretty safe to always just return 1 from XkbDDXUsesSoftRepeat. We > can gut the rest later on, as a continuation of xkb-atkins. I don't > have a clean tree around (am in the middle of a big rebase -i with large > uncommitted changes), but if you or anyone else feels like committing > that, and you've tested that it works: > Signed-off-by: Daniel Stone <[EMAIL PROTECTED]>
I did some tests and it turned out that commit 6867652c2c8ad563d5655302d94134592b10265b in xf86-input-evdev did not stop the event from sending repeated events at all. I replaced it with a patch that just ignores all autorepeated events in evdev. Has the same effect. And with kicking out the code of xserver, I get completely working and correct key autorepeat. Delay and rate is correct, default is working as well and modifiers don't repeat, as expected. When applying the evdev patch but not the xserver patch, you get non-working autorepeat when it's set exactly to a delay of 660 and rate of 25 (interval 40), which is the default. I'd rather send the patches to the list first, so you can decide which branches to commit them to. Cheers, Sascha
diff --git a/src/evdev.c b/src/evdev.c
index 7b06c91..d246eed 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -238,15 +238,10 @@ PostKbdEvent(InputInfoPtr pInfo, struct input_event *ev, int value)
int code = ev->code + MIN_KEYCODE;
static char warned[KEY_MAX];
- /* filter repeat events for chording keys */
- if (value == 2 &&
- (ev->code == KEY_LEFTCTRL || ev->code == KEY_RIGHTCTRL ||
- ev->code == KEY_LEFTSHIFT || ev->code == KEY_RIGHTSHIFT ||
- ev->code == KEY_LEFTALT || ev->code == KEY_RIGHTALT ||
- ev->code == KEY_LEFTMETA || ev->code == KEY_RIGHTMETA ||
- ev->code == KEY_CAPSLOCK || ev->code == KEY_NUMLOCK ||
- ev->code == KEY_SCROLLLOCK)) /* XXX windows keys? */
- return;
+ /* Filter all repeated events from device.
+ We'll do softrepeat in the server */
+ if (value == 2)
+ return;
if (code > 255 && ev->code < KEY_MAX) {
if (!warned[ev->code])
diff --git a/xkb/ddxCtrls.c b/xkb/ddxCtrls.c
index 34ea0bd..be269c2 100644
--- a/xkb/ddxCtrls.c
+++ b/xkb/ddxCtrls.c
@@ -57,27 +57,7 @@ int realRepeat;
int
XkbDDXUsesSoftRepeat(DeviceIntPtr pXDev)
{
-#ifndef XKB_ALWAYS_USES_SOFT_REPEAT
- if (pXDev && pXDev->kbdfeed ) {
- if (pXDev->kbdfeed->ctrl.autoRepeat) {
- if (pXDev->key && pXDev->key->xkbInfo) {
- XkbDescPtr xkb;
- xkb= pXDev->key->xkbInfo->desc;
- if ((xkb->ctrls->repeat_delay == 660) &&
- (xkb->ctrls->repeat_interval == 40) &&
- ((xkb->ctrls->enabled_ctrls&(XkbSlowKeysMask|
- XkbBounceKeysMask|
- XkbMouseKeysMask))==0)) {
- return 0;
- }
- return ((xkb->ctrls->enabled_ctrls&XkbRepeatKeysMask)!=0);
- }
- }
- }
- return 0;
-#else
return 1;
-#endif
}
void
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ xorg mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/xorg
