Lines Matching refs:uinput
48 #include "uinput.h"
250 if (write(fake->uinput, &event, sizeof(event)) != sizeof(event)) {
251 error("Error writing to uinput device");
259 if (write(fake->uinput, &event, sizeof(event)) != sizeof(event)) {
260 error("Error writing to uinput device");
267 ioctl(fake->uinput, UI_DEV_DESTROY);
268 close(fake->uinput);
269 fake->uinput = -1;
281 fake->uinput = open("/dev/input/uinput", O_RDWR);
282 if (fake->uinput < 0) {
283 fake->uinput = open("/dev/uinput", O_RDWR);
284 if (fake->uinput < 0) {
285 fake->uinput = open("/dev/misc/uinput", O_RDWR);
286 if (fake->uinput < 0) {
287 error("Error opening uinput device file");
299 if (write(fake->uinput, &dev, sizeof(dev)) != sizeof(dev)) {
300 error("Error creating uinput device");
305 if (ioctl(fake->uinput, UI_SET_EVBIT, EV_KEY) < 0) {
306 error("Error enabling uinput device key events");
313 if (ioctl(fake->uinput, UI_SET_KEYBIT,
315 error("Error enabling uinput key %i",
321 if (ioctl(fake->uinput, UI_DEV_CREATE) < 0) {
322 error("Error creating uinput device");
329 close(fake->uinput);
395 * and create the uinput necessary */
398 error("Error setting up uinput");