[BRLTTY] BRLTTY and the latex-access project by means of python brlapi module

Daniel Dalton d.dalton at iinet.net.au
Tue Nov 29 05:14:52 EST 2011


On Sun, Nov 27, 2011 at 12:32:08PM +0100, Samuel Thibault wrote:
> > 4) When the user switches emacs buffers, or say opens a new screen
> > terminal, I need to know when to leaveTtyMode. How could I detect when I
> > need to leave tty mode?
> 
> Concerning "opening a new screen terminal", you don't need to leave,
> it's the brlapi server which gets notified of the switch through another
> way (a Linux ioctl, or the xbrlapi program). See part "3.1 VT switching"
> of the brlapi manual.

I shall read that. I tested just now and it is ok for switching of
virtual terminals, but if I'm switching to an entirely new terminal
i.e. under the screen emulator, so on the same console, the Braille
display still remains under the control of my application and not
BRLTTY. Is there an easy way to handle this? 

Also if my app is started under screen it seems that brlapi can't switch
to terminal mode since it can't find my console number. How to best
handle this? 
I.e. 

>>> import brlapi
>>> b=brlapi.Connection()
>>> b.enterTtyMode()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "brlapi.pyx", line 368, in brlapi.Connection.enterTtyMode
brlapi.OperationError
>>> b.enterTtyMode(1)
1
>>> b.leaveTtyMode()
0
>>> 

> Concerning emacs buffer switching, something has to be added indeed. I
> don't know how you can request emacs to notify you when the user leaves
> your buffer.

Yes, that will be easy enough...:)

Thanks for your help.

Dan


More information about the BRLTTY mailing list