Lines Matching +full:input +full:- +full:value
1 .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later
6 .. code-block:: c
8 /* keytable.c - This program allows checking/replacing keys at IR
10 Copyright (C) 2006-2009 Mauro Carvalho Chehab <mchehab@kernel.org>
28 #include <linux/input.h>
37 for (p=keynames;p->name!=NULL;p++) {
38 if (p->value == (unsigned)codes[1]) {
39 printf("scancode 0x%04x = %s (0x%02x)\\n", codes[0], p->name, codes[1]);
54 for (p=keynames;p->name!=NULL;p++) {
55 if (!strcasecmp(p->name, string)) {
56 return p->value;
59 return -1;
72 return -1;
76 perror("Couldn't open input device");
77 return(-1);
81 int value;
83 value=parse_code(argv[3]);
85 if (value==-1) {
86 value = strtol(argv[3], NULL, 0);
88 perror("value");
92 codes [1] = (unsigned) value;
104 int value;
110 return -1;
125 perror ("parsing input file scancode");
126 return -1;
131 perror ("parsing input file scancode");
132 return -1;
138 perror ("parsing input file keycode");
139 return -1;
143 value=parse_code(keycode);
144 // printf ("\\tvalue=%d\\n",value);
146 if (value==-1) {
147 value = strtol(keycode, NULL, 0);
149 perror("value");
153 codes [1] = (unsigned) value;