[BRLTTY] braillekey code, solved
Samuel Thibault
samuel.thibault at ens-lyon.org
Fri Dec 6 10:35:16 EST 2019
Quartel, Eric de, le ven. 06 déc. 2019 13:50:16 +0000, a ecrit:
> In the code there is and error, I changed the line
>
> printf("key %x name %s\n", keys[i], name); in
>
> printf("key %d name %s\n", i, name);
>
> and now I can see the codes.
Ok, I see what happened. You need to take care of the warnings that the
compiler prints: with the keys[i] version it tells you that the format
is incorrect, it should indeed rather be
printf("key %"BRLAPI_PRIxKEYCODE" name %s\n", keys[i], name); in
since keys[i] is not an int, but a 64bit value.
That's important because "i" alone will not give you what you want since
it's only the index in the keys array. You really want to use keys[i] to
know the keycode for each key.
Samuel
More information about the BRLTTY
mailing list