[BRLTTY] BrlAPI Raw key code mode?

Samuel Thibault samuel.thibault at ens-lyon.org
Sat Nov 23 10:47:04 EST 2019


Hello,

Re-triggering this old thread, since we now (at last!) have the
parameters support in master.

Samuel Thibault, le dim. 27 août 2017 17:34:24 +0200, a ecrit:
> - add brlapi_getModelName(void) so the application knows what values it
>   should expect from readKey.

This was eventually called brlapi_getModelIdentifier.

This is now also available as brlapi_getParamAlloc(BRLAPI_PARAM_DEVICE_MODEL, 0, 1, NULL);

> - add brlapi_getKeys(void) which returns the set of keys known to be
>   available on the model.  I however don't think the brltty core knows
>   that yet?  I'm also not sure how useful it is to applications.

This is now available as 

size_t len;
brlapi_param_keyCode_t *keys = brlapi_getParameterAlloc(BRLAPI_PARAM_DEVICE_KEY_CODES, 0, 1, &len);

> - add brlapi_getRawKeyName(code) which returns as a string the name of
>   the key as brltty knows it (e.g. B1, B4, SpaceLeft, LeftRockerTop,
>   ...) so that the application can implement nice keyname-to-action
>   configuration for the user.

This is now available as

char *name = brlapi_getParameterAlloc(BRLAPI_BRLAPI_PARAM_KEY_SHORT_NAME, keys[i], 1, NULL);


There are also

size_t len;
brlapi_param_commandCode_t *commands = brlapi_getParameterAlloc(BRLAPI_PARAM_BOUND_COMMAND_CODES, 0, 1, &len);
char *name = brlapi_getParameterAlloc(BRLAPI_PARAM_COMMAND_SHORT_NAME, commands[i], 1, NULL);

Samuel


More information about the BRLTTY mailing list