22 #include "lirc/input_map.h"
24 typedef unsigned short linux_input_code;
29 linux_input_code
code;
31 #include "lirc/input_map.inc"
37 int get_input_code(
const char* name, linux_input_code* code)
41 for (i = 0; input_map[i].name != NULL; i++) {
42 if (strcasecmp(name, input_map[i].name) == 0) {
43 *code = input_map[i].code;
50 void fprint_namespace(FILE* f)
54 for (i = 0; input_map[i].name != NULL; i++)
55 fprintf(stdout,
"%s\n", input_map[i].name);
58 int is_in_namespace(
const char* name)
60 linux_input_code dummy;
62 return get_input_code(name, &dummy) == -1 ? 0 : 1;
char * name
Name of command.
ir_code code
The first code of the command.