[BRLTTY] how to use readKey on Windows

Samuel Thibault samuel.thibault at ens-lyon.org
Thu Nov 27 20:50:52 EST 2008


Thijs Koerselman, le Wed 26 Nov 2008 19:30:35 +0100, a écrit :
> I am wondering if I'm taking the right approach. My plan was to spawn a new
> thread from my main app. This thread then calls readKey() in an infinite loop
> (as long as some flag is valid). The keys returned by brlapi are buffered, and
> my main app is reading this buffer at fixed intervals.

Mmm, why not just making your main app just call readKey() at fixed
intervals with the "block" parameter set to no?

> Just to be sure I'm not doing something incredibly stupid I posted some code of
> a simple test method below.

It is completely correct and does work for me when I put it in a single
.c file.

Samuel


More information about the BRLTTY mailing list