summaryrefslogtreecommitdiff
path: root/shared.c
blob: a1ce931a6096f2aac5735134f041e5d8e8bcf12b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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;
}