Lines Matching full:codes
33 void prtcode (int *codes)
38 if (p->value == (unsigned)codes[1]) {
39 printf("scancode 0x%04x = %s (0x%02x)\\n", codes[0], p->name, codes[1]);
44 if (isprint (codes[1]))
45 printf("scancode %d = '%c' (0x%02x)\\n", codes[0], codes[1], codes[1]);
47 printf("scancode %d = 0x%02x\\n", codes[0], codes[1]);
66 int codes[2];
91 codes [0] = (unsigned) strtol(argv[2], NULL, 0);
92 codes [1] = (unsigned) value;
94 if(ioctl(fd, EVIOCSKEYCODE, codes))
97 if(ioctl(fd, EVIOCGKEYCODE, codes)==0)
98 prtcode(codes);
116 codes[0] = (j << 8) | i;
117 codes[1] = KEY_RESERVED;
118 ioctl(fd, EVIOCSKEYCODE, codes);
152 codes [0] = (unsigned) strtol(scancode, NULL, 0);
153 codes [1] = (unsigned) value;
155 // printf("\\t%04x=%04x\\n",codes[0], codes[1]);
156 if(ioctl(fd, EVIOCSKEYCODE, codes)) {
157 fprintf(stderr, "Setting scancode 0x%04x with 0x%04x via ",codes[0], codes[1]);
161 if(ioctl(fd, EVIOCGKEYCODE, codes)==0)
162 prtcode(codes);
170 codes[0] = (j << 8) | i;
171 if (!ioctl(fd, EVIOCGKEYCODE, codes) && codes[1] != KEY_RESERVED)
172 prtcode(codes);