aboutsummaryrefslogtreecommitdiffstats
path: root/utils/keytable/keymap.h
blob: df0ba814d654044449b698abdc07c6732da83207 (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
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __KEYMAP_H
#define __KEYMAP_H

struct keymap {
	struct keymap *next;
	char *name;
	char *protocol;
	char *variant;
	struct protocol_param *param;
	struct scancode_entry *scancode;
	struct raw_entry *raw;
};

struct protocol_param {
	struct protocol_param *next;
	char *name;
	long int value;
};

struct scancode_entry {
	struct scancode_entry *next;
	u_int32_t scancode;
	char *keycode;
};

struct raw_entry {
	struct raw_entry *next;
	u_int32_t scancode;
	u_int32_t raw_length;
	char *keycode;
	u_int32_t raw[1];
};

void free_keymap(struct keymap *map);
error_t parse_keyfile(char *fname, struct keymap **keymap, bool verbose);

#endif

Privacy Policy