[BRLTTY] Mapping a braille display input character to a computer-keyboard/browser character.

Siju Samuel sijusamueltech at gmail.com
Thu Sep 26 12:22:37 EDT 2013


Hi Samuel,


>> you should have already the 2+3 combination, as just one character.
>>If that's not the case, the driver should be fixed.

Currently I am using the brltty simulator and expecting a real device soon.
 I have checked the brltty log as well, which also gives codes
corresponding to DOT1, DOT2 for the entry corresponding to character "b"
[which is *client code 0000000000000061,   client code 0000000000000031 *]
.  With reference to your reply; in actual device, is it supposed to get
only ONE client code corresponding to the entry DOT1 and DOT2 between two
CURSOR keys.

In  other words is the  readKey() function supposed to get only one value
 irrespective of the number of dots it is pressed in the device at a
cursor.

Here is the relevant client code  and brltty log.  So in the actual device,
is it expecting only five readKey() instead of the current 6 read.

[ readKey() for pressing  cursorAT32-b-cursorAT33-a-FWINT. The
corresponding braille input is   CRSOR32-DOT1-DOT2-CURSOR33-DOT1-FWINRT.
The clientcode, client program-output and brlttylog are below.


//Client Program - Call  sequence in a loop
//-----------------------------------------------------------
readeKey()
brlapi_expandKeyCode(key, &ekey);
fprintf(stderr, "type %u, command %u, argument %u, flags %u\n",
   ekey.type, ekey.command, ekey.argument, ekey.flags);

brlapi_describeKeyCode(key, &dkey);
fprintf(stderr, "type %s, command %s, argument %u, flags",
  dkey.type, dkey.command, dkey.argument);



// Program Output
//--------------------------
(1)
type CMD, command ROUTE, argument 31, flags
type 0, command 0, argument 97, flags 0

(2)
 type SYM, command LATIN1, argument 97, flags
type 0, command 0, argument 49, flags 0

(3)
type SYM, command LATIN1, argument 49, flags
type 536870912, command 65536, argument 32, flags 0

(4)
type CMD, command ROUTE, argument 32, flags
type 0, command 0, argument 97, flags 0

(5)
type SYM, command LATIN1, argument 97, flags
type 536870912, command 24, argument 0, flags 0

(6)
type CMD, command FWINRT, argument 0, flags



//----------------------------------------------------------------------------------------
//BRLTTY LOG  with additional  comments
//----------------------------------------------------------------------------------------
//Sequence of Pressing CRSOR32-DOT1-DOT2-CURSOR33-DOT1-FWINRT in order

//1. PRESSING  command: 00011F (ROUTE: bring cursor to character #32)
brltty.exe: API got command 0000011f, thus client code 000000002001001f
brltty.exe: API got command 0000011f from repeat engine, thus client code
000000002001001f
brltty.exe: Transmitting accepted command 11f as client code
000000002001001f
brltty.exe: writing key 00000000 1f000120

//2. PRESSING  002201 (PASSDOTS: type braille character [1]) -
Corresponding to DOT1 of b
brltty.exe: API got command 00002201, thus client code *0000000000000061*
brltty.exe: API got command 00002201 from repeat engine, thus client code
0000000000000061
brltty.exe: Transmitting accepted command 2201 as client code
0000000000000061
brltty.exe: writing key 00000000 61000000


//3. PRESSING  002202 (PASSDOTS: type braille character [2]) -
Corresponding to DOT2 of b
brltty.exe: API got command 00002202, thus client code* 0000000000000031*
brltty.exe: API got command 00002202 from repeat engine, thus client code
0000000000000031
brltty.exe: Transmitting accepted command 2202 as client code
0000000000000031
brltty.exe: writing key 00000000 31000000

//4. PRESSING  000120 (ROUTE: bring cursor to character #33)
brltty.exe: API got command 00000120, thus client code 0000000020010020
brltty.exe: API got command 00000120 from repeat engine, thus client code
0000000020010020
brltty.exe: Transmitting accepted command 120 as client code
0000000020010020
brltty.exe: writing key 00000000 20000120

//5. PRESSING 002201 (PASSDOTS: type braille character [1]) - Corresponding
to DOT1 of a
brltty.exe: API got command 00002201, thus client code 0000000000000061
brltty.exe: API got command 00002201 from repeat engine, thus client code
0000000000000061
brltty.exe: Transmitting accepted command 2201 as client code
0000000000000061
brltty.exe: writing key 00000000 61000000

//6.PRESSING  000018 (FWINRT: go right one window)
brltty.exe: API got command 00000018, thus client code 0000000020000018
brltty.exe: API got command 00000018 from repeat engine, thus client code
0000000020000018
brltty.exe: Transmitting accepted command 18 as client code 0000000020000018
brltty.exe: writing key 00000000 18000020


Basically I am trying to understand how to handle Keypress of  multiple
DOTs  for a single english character.


>>The translation from dots to text is most probably better done thanks to
>>>liblouis, in order to properly support contracted text etc.
Yes.


Thanks,
Siju Samuel






On Wed, Sep 25, 2013 at 1:12 PM, Samuel Thibault <
samuel.thibault at ens-lyon.org> wrote:

> Hello,
>
> Siju Samuel, le Wed 18 Sep 2013 18:03:17 -0500, a écrit :
> > Assuming the following is true for  bralpi_readKey() in a Loop  (for
> reading
> > "ba" and later pressing linedown)
> >
> > 1. readKey() // gets code correspondning to moving the cursor
> > 2. readKey() // gets code for dot1
> > 3. readKey() // gets code  for dot2
> > 4. readkey() //  gets code correspondning to moving the cursor to next
> location
> > 5. readKey() // gets code for dot1
> > 6. readkey() //  gets code correspondning to moving the cursor to next
> location
> > 7. readkey() //  gets code for line down or ( next line)
> >
> >
> > Do there have any routine or an easy way to combine 2 and 3 (above)
>
> Mmm, you should have already the 2+3 combination, as just one character.
> If that's not the case, the driver should be fixed.
>
> > to the Unicode corresponding to "b".
>
> The translation from dots to text is most probably better done thanks to
> liblouis, in order to properly support contracted text etc.
>
> Samuel
> _______________________________________________
> This message was sent via the BRLTTY mailing list.
> To post a message, send an e-mail to: BRLTTY at mielke.cc
> For general information, go to: http://mielke.cc/mailman/listinfo/brltty
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mielke.cc/pipermail/brltty/attachments/20130926/333241f2/attachment.html>


More information about the BRLTTY mailing list