[BRLTTY] how to use readKey on Windows

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


Thijs Koerselman, le Wed 26 Nov 2008 22:28:47 +0100, a écrit :
> First of all I (still) need to call enterTtyModeWithPath() instead of
> enterTtyMode(), otherwise I never seem to get input.

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.

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

Samuel


More information about the BRLTTY mailing list