diff options
Diffstat (limited to 'shared.c')
-rw-r--r-- | shared.c | 45 |
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; +} + |