[BRLTTY] linux screen driver and commands

Samuel Thibault samuel.thibault at ens-lyon.org
Thu Mar 9 18:53:35 EST 2006


Hi,

While working on Linux kernel facilities for speech-based screen
readers, I found an interesting possibility for driving brltty's speech
with the PC keyboard, without having to patch the Linux kernel:

- open /dev/input/event0 (provided by the evdev module)
- call ioctl(fd, EVIOCGRAB, 1) on it: key presses stop being sent to the
  linux virtual console: instead,
- read(fd,buf,sizeof(struct input_event)) gets the key press event.

This hence permits to grab key presses, which can then be used for
driving speech reading etc., while the usual key presses can be
simulated back via the uinput facility that we already implemented (the
simulated device will appear as another /dev/input/event1 evdev file).

I will probably not work on this, but this should be enough material for
somebody to do it :) The only nasty thing is that /dev/input/event* may
also be mice etc... A parameter could be provided for the user to select
the proper one, since she may have several USB keyboards and only want
speech driving on one of them.

Regards,
Samuel


More information about the BRLTTY mailing list