[BRLTTY] how to use readKey on Windows

Thijs Koerselman thijskoerselman at gmail.com
Fri Nov 28 08:12:43 EST 2008


On Fri, Nov 28, 2008 at 3:13 AM, Samuel Thibault <
samuel.thibault at ens-lyon.org> wrote:


> What do you give as "tty" parameter to enterTtyMode()? You need to pass
> the root HWND of your application, or more precisely the HWND returned
> by GetForegroundWindow() when your application has the focus.
>

I think you're right. I probably didn't do that correctly. I'll try next
week when I have the braille thing again.


> > On close I try to end the thread of the input loop, and this hangs my
> > app in case it is waiting on readKey() to return.
>
> Ouch. I guess windows doesn't release the mutex that brlapi_readKey had
> taken, and thus closeConnection hangs... How do you end the thread?
> TerminateThread?
>
>
I'm using the api threading facilities in Max (systhread), which seems to be
based on POSIX, but I'm not sure. I call systread_join() when closing the
app while my thread is still running (waiting for readKey()).

Polling the device without the blocking works fine now, so its no problem
anyway.

Thanks for you help.

Cheers,
Thijs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mielke.cc/pipermail/brltty/attachments/20081128/7648c070/attachment.html 


More information about the BRLTTY mailing list