Skip to content

Implement a feature with possible turning on/off how present Orca with cursor highlighted word

Hi Joanie,

Now, Orca always presents cursor highlighted word with uncontracted, computer braille format (the compBrlAtCursor mode is used usual in src/orca/braille.py file). Look the lou_translate and lou_TranslateString related documentation: 7.6 Lou_translateString 7.7 lou_translate

With mode parameter are describe following the documentation:

The mode parameter specifies how the translation should be done. The valid values of mode are defined in liblouis.h. They are all powers of 2, so that a combined mode can be specified by adding up different values. Note that the mode parameter is an integer, not a pointer to an integer. A combination of the following mode flags can be used with the lou_translateString function:

compbrlAtCursor

If this bit is set in the mode parameter the space-bounded characters containing the cursor will be translated in computer braille.

compbrlLeftCursor

If this bit is set, only the characters to the left of the cursor will be in computer braille. This bit overrides compbrlAtCursor.

dotsIO

When this bit is set, during forward translation, Liblouis will produce output as dot patterns. During back-translation Liblouis accepts input as dot patterns. Note that the produced dot patterns are affected if you have any display opcode (see display) defined in any of your tables.

ucBrl

The ucBrl (Unicode Braille) bit is used by the functions lou_charToDots and lou_translate. It causes the dot patterns to be Unicode Braille rather than the liblouis representation. Note that you will not notice any change when setting ucBrl unless dotsIO is also set. lou_dotsToChar and lou_backTranslate recognize Unicode braille automatically.

partialTrans

This flag specifies that back-translation input should be treated as an incomplete word. Rules that apply only for complete words or at the end of a word will not take effect. This is intended to be used when translating input typed on a braille keyboard to provide a rough idea to the user of the characters they are typing before the word is complete. noUndefined Setting this bit disables the output of hexadecimal values when forward-translating undefined characters (characters that are not matched by any rule), and dot numbers when back-translating undefined braille patterns (braille patterns that are not matched by any rule). The default is for liblouis to output the hexadecimal value (as ’\xhhhh’) of an undefined character when forward-translating and the dot numbers (as \ddd/) of an undefined braille pattern when back-translating. When back translating input from a braille keyboard cell by cell, it is desirable to output characters as soon as they are produced. Similarly, when back translating contracted braille, it is desirable to provide a "guess" to the user of the characters they typed. To achieve this, liblouis needs to have the ability to produce no text when indicators (which don’t produce a character by themselves) are not followed by another cell. This works automatically for indicators liblouis knows about such as capital sign, number sign, etc., but it does not work for indicators which are not (and cannot be) specifically defined as indicators. For example, in UEB, dots 4 5 6 alone produces the text "\456/". Setting the noUndefined mode suppresses this dot number output. The function returns 1 if no errors were encountered2 and 0 otherwise.

The default is contracted format, but if the user checking the „Present the cursor highlighted word with uncontracted format”, the user experiences now default Braille layout, with is unchangeable now. My experience better reading any text if the cursor highlighted word are presents Liblouis with contracted format. For example, NVDA have a similar feature.

I hope now not have already UI freeze, and possible merging this feature change into master branch. If this is not possible now, I hopefully future release have possibility to merge upstream level this feature, for example in hungary since 2010 hungarian visually impaired people using this feature with IT Foundation for the Visually Impaired - Hungary developed Ubuntu based accessible BeLin named distribution, similar my another feature, with supports presents mnemonics in braille display, similar with speech support. Future I very would like doing the present child position feature too.

Take care , and thank you the review,

Attila

Merge request reports