Filter all incoming repeated key events

Not just filter modifiers but every repeated key, because the software implementation will take care of what key to
repeat and what not. Otherwise the kernel's autorepeated keys interfere with the software generated ones.
This commit is contained in:
Sascha Hlusiak
2008-02-19 21:09:13 +01:00
parent f766404fd9
commit 10e7c3fbdf

View File

@@ -517,18 +517,8 @@ EvdevKeyProcess (InputInfoPtr pInfo, struct input_event *ev)
{
int keycode = ev->code + MIN_KEYCODE;
/* filter repeat events for chording keys */
if (ev->value == 2) {
DeviceIntPtr device = pInfo->dev;
KeyClassRec *keyc = device->key;
KbdFeedbackClassRec *kbdfeed = device->kbdfeed;
int num = keycode >> 3;
int bit = 1 << (keycode & 7);
if (keyc->modifierMap[keycode] ||
!(kbdfeed->ctrl.autoRepeats[num] & bit))
return;
}
/* filter all repeat events */
if (ev->value == 2) return;
xf86PostKeyboardEvent(pInfo->dev, keycode, ev->value);
}