mirror of
https://github.com/X11Libre/xf86-input-evdev.git
synced 2026-04-14 11:44:16 +00:00
Compare commits
4 Commits
xf86-input
...
xf86-input
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ed1382866c | ||
|
|
8fe38b2287 | ||
|
|
ef607b6cce | ||
|
|
906a5d6add |
@@ -22,7 +22,7 @@
|
||||
|
||||
AC_PREREQ(2.57)
|
||||
AC_INIT([xf86-input-evdev],
|
||||
2.0.3,
|
||||
2.0.4,
|
||||
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
|
||||
xf86-input-evdev)
|
||||
|
||||
|
||||
15
src/evdev.c
15
src/evdev.c
@@ -131,6 +131,9 @@ PostButtonClicks(InputInfoPtr pInfo, int button, int count)
|
||||
static void
|
||||
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 ||
|
||||
@@ -141,7 +144,14 @@ PostKbdEvent(InputInfoPtr pInfo, struct input_event *ev, int value)
|
||||
ev->code == KEY_SCROLLLOCK)) /* XXX windows keys? */
|
||||
return;
|
||||
|
||||
xf86PostKeyboardEvent(pInfo->dev, ev->code + MIN_KEYCODE, value);
|
||||
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;
|
||||
}
|
||||
|
||||
xf86PostKeyboardEvent(pInfo->dev, code, value);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -162,7 +172,7 @@ EvdevReadInput(InputInfoPtr pInfo)
|
||||
if (len != sizeof ev) {
|
||||
/* The kernel promises that we always only read a complete
|
||||
* event, so len != sizeof ev is an error. */
|
||||
xf86Msg(X_ERROR, "Read error: %s\n", strerror(errno));
|
||||
xf86Msg(X_ERROR, "%s: Read error: %s\n", pInfo->name, strerror(errno));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -864,6 +874,7 @@ EvdevProc(DeviceIntPtr device, int what)
|
||||
|
||||
case DEVICE_CLOSE:
|
||||
xf86Msg(X_INFO, "%s: Close\n", pInfo->name);
|
||||
close(pInfo->fd);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user