summaryrefslogtreecommitdiff
path: root/shared.c
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2015-07-22 23:39:29 +0200
committerDavid Härdeman <david@hardeman.nu>2015-07-22 23:39:29 +0200
commit10836ae78302aa778553300167f6cdebdf8d884b (patch)
treeebb7a3501b11682de18055b813ed5007cb7ffd5d /shared.c
parentb51c1c648146e49c25c4d6a2a6f5b9b66ea3190d (diff)
Improve rcm-server integration with evdev generation
Diffstat (limited to 'shared.c')
-rw-r--r--shared.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/shared.c b/shared.c
new file mode 100644
index 0000000..a1ce931
--- /dev/null
+++ b/shared.c
@@ -0,0 +1,45 @@
+#include <stdlib.h>
+#include <strings.h>
+
+#include "shared.h"
+
+const char *rc_protocols[] = {
+ "Unknown",
+ "Other",
+ "RC5",
+ "RC5X",
+ "RC5 StreamZap",
+ "JVC",
+ "Sony12",
+ "Sony15",
+ "Sony20",
+ "NEC",
+ "Sanyo",
+ "MCE Keyboard",
+ "RC6-0-16",
+ "RC6-6A-20",
+ "RC6-6A-24",
+ "RC6-6A-32",
+ "RC6-MCE",
+ "Sharp",
+ "XMP",
+ NULL
+};
+
+struct linux_input_keycode linux_input_keycodes[] = {
+#include "linux-input-keycodes.h"
+};
+
+struct linux_input_keycode *
+get_linux_keycode_by_name(const char *name)
+{
+ unsigned i;
+
+ for (i = 0; linux_input_keycodes[i].name; i++) {
+ if (!strcasecmp(name, linux_input_keycodes[i].name))
+ return &linux_input_keycodes[i];
+ }
+
+ return NULL;
+}
+