[BRLTTY] Low-level BrlAPI questions
Samuel Thibault
samuel.thibault at ens-lyon.org
Wed Apr 14 11:44:47 EDT 2021
Aura Kelloniemi, le mer. 14 avril 2021 18:26:04 +0300, a ecrit:
> These are just plain numeric
> ranges – no specific bit-pattern handling is performed on the server side to
> specialize these ranges to BRLTTY commands or key syombols.
No, the flags are handled as a bit mask, not as a range (it would
be completely unusable otherwise). I was next to sure that this was
documented either in the manpage or in the brlapi documentation, but I
cannot find it off-hand. Basically what you want to look at is the
inKeyrange function.
> I wrote a test which tries to ignore the LNUP command:
>
> const brlapi_keyCode_t cmds[1] = { BRLAPI_KEY_CMD_LNUP };
> brlapi_ignoreKeys(brlapi_rangeType_command, cmds, 1)
>
> but I get an invalid parameter error.
BRLAPI_KEY_CMD_LNUP alone is not enough, you need to also specify the
type of key with BRLAPI_KEY_TYPE_CMD otherwise it's not a complete
keycode value. See e.g.
Bindings/Python/brlapi.pyx: b.acceptKeyRanges([(brlapi.KEY_TYPE_CMD|brlapi.KEY_CMD_PASSDOTS, brlapi.KEY_TYPE_CMD|brlapi.KEY_CMD_PASSDOTS|brlapi.KEY_CMD_ARG_MASK)])
Samuel
More information about the BRLTTY
mailing list