fixed: wrong key names after 'z' when using -v
This commit is contained in:
parent
1b7af99723
commit
344887c925
10
hkd.c
10
hkd.c
@ -330,11 +330,15 @@ int main (int argc, char *argv[])
|
|||||||
if (pb.size <= prev_size)
|
if (pb.size <= prev_size)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// FIXME: keys after "z" are not shown properly, wrong name
|
|
||||||
if (vflag) {
|
if (vflag) {
|
||||||
|
int ci;
|
||||||
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("%s ", key_conversion_table[pb.buf[i] - 1].name);
|
ci = i;
|
||||||
|
while (pb.buf[i] != key_conversion_table[ci + 1].value)
|
||||||
|
ci++;
|
||||||
|
printf("%s ", key_conversion_table[ci + 1].name);
|
||||||
|
}
|
||||||
putchar('\n');
|
putchar('\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user