summaryrefslogtreecommitdiffstats
path: root/toolbox/getevent.c
diff options
context:
space:
mode:
Diffstat (limited to 'toolbox/getevent.c')
-rw-r--r--toolbox/getevent.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/toolbox/getevent.c b/toolbox/getevent.c
index da83ec3..30053af 100644
--- a/toolbox/getevent.c
+++ b/toolbox/getevent.c
@@ -10,8 +10,27 @@
#include <sys/poll.h>
#include <linux/input.h>
#include <errno.h>
+#include <unistd.h>
-#include "getevent.h"
+struct label {
+ const char *name;
+ int value;
+};
+
+#define LABEL(constant) { #constant, constant }
+#define LABEL_END { NULL, -1 }
+
+static struct label key_value_labels[] = {
+ { "UP", 0 },
+ { "DOWN", 1 },
+ { "REPEAT", 2 },
+ LABEL_END,
+};
+
+#include "input.h-labels.h"
+
+#undef LABEL
+#undef LABEL_END
static struct pollfd *ufds;
static char **device_names;