mirror of
https://github.com/X11Libre/xf86-input-evdev.git
synced 2026-04-14 11:44:16 +00:00
remove duplicate (code > 255) check.
This commit is contained in:
18
src/evdev.c
18
src/evdev.c
@@ -259,16 +259,18 @@ PostKbdEvent(InputInfoPtr pInfo, struct input_event *ev, int value)
|
||||
if (value == 2)
|
||||
return;
|
||||
|
||||
if (code > 255 && ev->code <= KEY_MAX) {
|
||||
if (!warned[ev->code])
|
||||
xf86Msg(X_WARNING, "%s: unable to handle keycode %d\n",
|
||||
pInfo->name, ev->code);
|
||||
warned[ev->code] = 1;
|
||||
}
|
||||
|
||||
/* The X server can't handle keycodes > 255 anyway, just drop them. */
|
||||
if (code > 255)
|
||||
{
|
||||
if (ev->code <= KEY_MAX && !warned[ev->code])
|
||||
{
|
||||
xf86Msg(X_WARNING, "%s: unable to handle keycode %d\n",
|
||||
pInfo->name, ev->code);
|
||||
warned[ev->code] = 1;
|
||||
}
|
||||
|
||||
/* The X server can't handle keycodes > 255. */
|
||||
return;
|
||||
}
|
||||
|
||||
xf86PostKeyboardEvent(pInfo->dev, code, value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user