[BRLTTY] BrlAPI Raw key code mode?

Aura Kelloniemi kaura.dev at sange.fi
Fri Sep 1 01:30:47 EDT 2017


Samuel Thibault <samuel.thibault at ens-lyon.org> writes:
 > Just to try to summarize a bit what I get from the discussion (I
 > couldn't really participate to the thread for lack of time, sorry), what
 > could be implemented right away without actual discussion because they
 > have clear semantic are:

 > - add brlapi_getModelName(void) so the application knows what values it
 >   should expect from readKey.

Yes please.

 > - 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.

Yes please.

 > - add brlapi_getKeys(void) which returns the set of keys known to be
 >   available on the model.

Yes please. Please return the key name, the key code for pressing the key, and
the key code for releasing the key. This way the application can build a table
where they can look if a particular key is being pressed or not.

 > I'm also not sure how useful it is to applications.

With this information applications can validate key names if they allow the
user to use the key names to configure key bindings. This is essential. Other
uses are also possible (maybe in an interactive context).

 > - It'd be sad not to leverage BRLTTY's nice keybinding management.
 >   Perhaps it could be put on the client side within libbrlapi. That's
 >   a bit like xkb.  Then there is still the question of having standard
 >   sets of commands, but at least the question will have gotten away from
 >   source code.

I strongly support this. It makes life very easy
- for the application programmer who can just import a predefined or user-defined
braille table which provides extensions to the base command set provided by
BRLTTY. They get free access to very featureful key binding management system
which can be extended even more, if so desired.
- for the user who does not need to learn yet another key table configuration
syntax chosen by the client application.

-- 
Aura


More information about the BRLTTY mailing list