[BRLTTY] adding custom command to replace a braille window

Vikash Kesharwani vikash.kesarwani at kritikalsolutions.com
Sat May 20 09:14:29 EDT 2017


Hi everyone,

For one of my projects I am trying to replace current braille window with
another text buffer. For this I am following steps below-

1. Create custom command to delete the window content. (called from
brl_readCommand using enqueCommand)
   - calculate the current window length
   - get current cursor position
   - insertScreenKey(SCR_KEY_BACKSPACE) for characters on the left of cursor
   - insertScreenKey(SCR_KEY_DELETE) for characters on the right of cursor

2. Insert new text buffer characters one by one using
enuqueCommand(BRL_CMD_BLK(PASSCHAR) | char) (called from brl_readCommand
using enqueCommand)
3. Create a custom command to set position(ses->winx) of new braille window
to the to desired position (called from brl_readCommand using enqueCommand)
4. set cursor position using enqueueCommand(BRL_CMD_BLK(ROUTE) | cursor)
(called from brl_readCommand using enqueCommand)

First two steps are working fine. but the last two don't work all the time.

Please suggest if I am doing it correctly. Or suggest if there is any
better approach to this problem.


--
Thanks & Regards,
Vikash Kesarwani
Lead Engineer - Software
Kritikal Solutions Pvt. Ltd.
Tel: +91 120 4048600
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://brltty.com/pipermail/brltty/attachments/20170520/a7a57236/attachment.html>


More information about the BRLTTY mailing list