File: keymap.h

package info (click to toggle)
v4l-utils 1.32.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,276 kB
  • sloc: ansic: 85,528; cpp: 69,473; perl: 11,915; sh: 1,333; python: 883; php: 119; makefile: 39
file content (41 lines) | stat: -rw-r--r-- 771 bytes parent folder | download | duplicates (5)
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
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __KEYMAP_H
#define __KEYMAP_H

#include <stdint.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;
	uint64_t scancode;
	char *keycode;
};

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

void free_keymap(struct keymap *map);
error_t parse_keymap(char *fname, struct keymap **keymap, bool verbose);
int keymap_param(struct keymap *map, const char *name, int fallback);

#endif