[BRLTTY] Xbrlapi

Sébastien Hinderer Sebastien.Hinderer at ens-lyon.org
Mon Dec 11 15:33:08 EST 2006


Samuel Thibault :
> Willie Walker, le Mon 11 Dec 2006 15:08:23 -0500, a écrit :
> > > It looks like this is what happens. Orca should ignore the key events
> > > that it doesn't handle.
> > 
> > I believe Orca does indeed ignore them.
> 
> By "ignore", I mean "call brlapi_ignoreKeyRange", not only "do nothing
> when the keypress event comes".

Yes, it is very important that Orca calls brlapi_ignoreKeyRange for
every key range it is not interesded in. The way things work in BrlAPI's
server is as follows:
when a key is pressed on the braille device's keyboard, the server checks
whether the application that currently has the focus ignores or accepts
the key. If the key is in the set of accepted keys, it is sent to the
application, which can do whatever it wants, including nothing at all,
synthetising a keyboard event, use it for navigation, etc.
If, o& the contrary, the pressed key belongs to she set of keys that are
_ignored_ by the application, then the key is returned to brltty, which
handles it as if no application would have the focus on this terminal.

Here is an example that should illustrate the interest of such a
mechanism.

Consider a braille device having both an alphanumeric keyboard and
navigation keys. Suppose this device is connected to a computer working
in text-mode, running brltty and with one application connected to
BrlAPI's server. If the application would have to handle every key coming
from the braille device (which was how BrlAPI worked at the very
beginning), then the application would certainly want to insert the
alphanumeric keys at the console, just like if they would have been typed
at the PC keybord. But inserting a key at the console is something brltty
already does, so why should appliction have to re-invent the wheel, we
wondered. And that's how the possibility for clients to ignore keys was
introduced. In our case, the client application would most probably
accept the navigation keys and ignore the alphanumeric keys, which would
hence be sent to brltty, which in turn would insert them to the console.

Hope this helps,
Sébastien.


More information about the BRLTTY mailing list