verbose option displays key names instead of values

very crude implementation, works for standard keys but breaks
for media/special keys, good enough for now
xkbcommon
Alessandro Mauri 4 years ago
parent ea6f548399
commit 6a5367ac00
  1. 3
      hkd.c

@ -304,7 +304,8 @@ int main (int argc, char *argv[])
if (vflag) { if (vflag) {
printf("Pressed keys: "); printf("Pressed keys: ");
for (unsigned int i = 0; i < pb.size; i++) for (unsigned int i = 0; i < pb.size; i++)
printf("%d ", pb.buf[i]); //printf("%d ", pb.buf[i]);
printf("%s ", key_conversion_table[pb.buf[i] - 1].name);
putchar('\n'); putchar('\n');
} }

Loading…
Cancel
Save