uinput_write_event
if ((x != 0 && uinput_write_event(fd, EV_REL, REL_X, x) < 0) ||
(y != 0 && uinput_write_event(fd, EV_REL, REL_Y, y) < 0) ||
(z != 0 && uinput_write_event(fd, EV_REL, REL_WHEEL, -z) < 0) ||
(t != 0 && uinput_write_event(fd, EV_REL, REL_HWHEEL, t) < 0))
if (uinput_write_event(fd, EV_KEY, mbuttons[i],
if (uinput_write_event(fd, EV_SYN, SYN_REPORT, 0) < 0)
if (uinput_write_event(fd, EV_KEY, keymap[key], make) > 0 &&
uinput_write_event(fd, EV_SYN, SYN_REPORT, 0) > 0)
if (uinput_write_event(fd, EV_KEY, consmap[key], make) > 0 &&
uinput_write_event(fd, EV_SYN, SYN_REPORT, 0) > 0)
uinput_write_event(fd, EV_LED, led_codes[i],