mirror of
https://github.com/X11Libre/xf86-input-evdev.git
synced 2026-03-30 04:14:16 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user