diff options
author | Sascha Hlusiak <saschahlusiak@arcor.de> | 2008-02-19 21:09:13 +0100 |
---|---|---|
committer | Sascha Hlusiak <saschahlusiak@arcor.de> | 2008-02-19 21:09:13 +0100 |
commit | 10e7c3fbdf4e94c212c0807844721064e7490729 (patch) | |
tree | 656792eba86ff2719e562c91c597667d0196293b | |
parent | f766404fd94851ea8b3cedc5c7336a5524b7a7ae (diff) |
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.
-rw-r--r-- | src/evdev_key.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/evdev_key.c b/src/evdev_key.c index 0f4edc6..ed3890c 100644 --- a/src/evdev_key.c +++ b/src/evdev_key.c @@ -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); } |