Skip to content

Commit

Permalink
interactive-evdev: reduce the space allocated for keysyms (#443)
Browse files Browse the repository at this point in the history
* interactive-evdev: reduce the printed space used for keysyms

In commit 8cca3a7 the buffer for the keysym
was extended to accommodate for up to XKB_COMPOSE_MAX_STRING_SIZE bytes. This
caused the printf to expand to the same width for the keysym alone, making the
output less useful. Drop this back down to the same width it was before.
  • Loading branch information
whot authored Feb 8, 2024
1 parent 1731c6b commit dd3e214
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/tools-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ tools_print_keycode_state(char *prefix,
printf("keysyms [ ");
for (int i = 0; i < nsyms; i++) {
xkb_keysym_get_name(syms[i], s, sizeof(s));
printf("%-*s ", (int) sizeof(s), s);
printf("%-*s ", XKB_KEYSYM_NAME_MAX_SIZE, s);
}
printf("] ");

Expand Down

0 comments on commit dd3e214

Please sign in to comment.