Re: [BRLTTY] adding custom command to replace a braille window

2017-05-26 Thread Mario Lang
Vikash Kesharwani  writes:

> Translation is not an issue. I am facing issue with cursor routing. It does
> not work all the time. Can there be any particular reason for this. Is
> cursor routing guaranteed to execute( I am using nano) or there is any
> scenario in which it can fail.
>
> I can see message that cursor is moving from [row1,colo1] -> [row2,col2]
> but it does not go to [row2,colo2] but stops before that.

Most editors do not allow you to move the cursor to the right of
inserted text/spaces.  Could that be the problem you are seeing?
IOW, if you are on a blank line, and invoke cursor routing
to go to the right of the current position, it will fail because the
editor does not allow arrow movements in that direction.  In general, if
you can go there by just using cursor keys, cursor routing should lso be
able to go there.  If you can not reach the location with normal cursor
keys, cursor routing will also not be able to go there.

One exception of this is picture-mode in Emacs.  But I guess most people
don't even know about that, so it is not really relevant here.

-- 
CYa,
  ⡍⠁⠗⠊⠕ | Blog:   GitHub: 
  .''`. | Twitter: @blindbird23FaceBook: disyled
 : :' : | SoundCloud: 
 `. `'  | YouTube: 
   `-
___
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: BRLTTY@brltty.com
For general information, go to: http://brltty.com/mailman/listinfo/brltty

Re: [BRLTTY] adding custom command to replace a braille window

2017-05-22 Thread Shérab
Dear Vikash,

Vikash Kesharwani (2017/05/21 09:08 +0530):
> I am working on a braille display, where we can support contracted input.
> So , since brltty does not support that, we decided to take user input in a
> temporary buffer, translate it and send it to brltty. Obviously this is
> very complex thing to implement, but I just want help on this issue I am
> facing.

OK, got it, thanks for clarifying.

In the long run, I think uncontracting should really not be done inside
of a braille driver because it is not a driver-specific thing.

Now if it is only for tests, cou might be able to do it in readCommand
as you propose but that looks as a lot of work, too.

If it is only for testing purposes, you could also write a BrlAPI client
that reads the keypresses and interprets them with the help of liblouis.
Of course the uncontracting feature would then be available only in this
client but it may be enough for testing.

hth,

Shérab.
___
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: BRLTTY@brltty.com
For general information, go to: http://brltty.com/mailman/listinfo/brltty

Re: [BRLTTY] adding custom command to replace a braille window

2017-05-20 Thread Vikash Kesharwani
I am working on a braille display, where we can support contracted input.
So , since brltty does not support that, we decided to take user input in a
temporary buffer, translate it and send it to brltty. Obviously this is
very complex thing to implement, but I just want help on this issue I am
facing.
--
Thanks & Regards,
Vikash Kesarwani
Lead Engineer - Software
Kritikal Solutions Pvt. Ltd.
Tel: +91 120 4048600

On Sun, May 21, 2017 at 12:55 AM, Shérab 
wrote:

> Dear Vikash,
>
> I'll leave the details to somebody else, perhaps Dave himself.
>
> What exactly are you trying to do? Why do you need to replace a window
> with another one?
>
> Could you perhaps give an example of a context where the thing you are
> trying to do would be useful?
>
> Cheers,
>
> Shérab.
> ___
> This message was sent via the BRLTTY mailing list.
> To post a message, send an e-mail to: BRLTTY@brltty.com
> For general information, go to: http://brltty.com/mailman/listinfo/brltty
___
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: BRLTTY@brltty.com
For general information, go to: http://brltty.com/mailman/listinfo/brltty

Re: [BRLTTY] adding custom command to replace a braille window

2017-05-20 Thread Shérab
Dear Vikash,

I'll leave the details to somebody else, perhaps Dave himself.

What exactly are you trying to do? Why do you need to replace a window
with another one?

Could you perhaps give an example of a context where the thing you are
trying to do would be useful?

Cheers,

Shérab.
___
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: BRLTTY@brltty.com
For general information, go to: http://brltty.com/mailman/listinfo/brltty

[BRLTTY] adding custom command to replace a braille window

2017-05-20 Thread Vikash Kesharwani
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
___
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: BRLTTY@brltty.com
For general information, go to: http://brltty.com/mailman/listinfo/brltty