diff options
author | Sascha Hlusiak <saschahlusiak@arcor.de> | 2008-12-08 12:27:34 +0100 |
---|---|---|
committer | Sascha Hlusiak <saschahlusiak@arcor.de> | 2008-12-08 12:27:34 +0100 |
commit | ece72ce9e97adae23b1932dc1334f63669196d56 (patch) | |
tree | b126181dae1e3f2e35f837784ac4b3789dce67b1 /src | |
parent | 2bf6e29b40f0da2bc417964fd2bd819306e5d3ed (diff) |
Filter all repeated keys from kernel, because we do softrepeat in server
Discard all repeated events that come from the device. The server will handle
per-key autorepeat in software.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/evdev.c | 13 |
1 files changed, 4 insertions, 9 deletions
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]) |