#include <linux/input.h>
+#include <sys/ioctl.h>
#include <pthread.h>
#include <stdint.h>
#include <stdio.h>
queued_keypresses--;
return;
}
+
+int grab_device(int fd) {
+ int rc = 0;
+ rc = ioctl(fd, EVIOCGRAB, (void *)1);
+ return rc;
+}
+
+int release_device(int fd) {
+ int rc = 0;
+ rc = ioctl(fd, EVIOCGRAB, (void *)0);
+ return rc;
+}