Braille input: emulate keys outside text content and support combining input with modifiers#7843
Conversation
…This allows backwards quick navigation using a capital sign. Support uncontracted partial translation outside text content
…res from a name containing NVDA
…ailleDisplayGestures
|
I've just tested this. It works perfectly. :) I have two suggestions:
What do you think? |
|
@Andre9642 commented on 15 Jan 2018, 04:40 CET:
When does the current code say this? It should only do it when speaking commands is on, when it is off and it says the shortcut, it is actually a bug :) As I'd like to bind this with speaking command keys, I think your request is beyond the scope of this pr.
This will be a part of another issue, most likely #2945. |
|
I'd say, let's delay this until 2018.2. I don't think it's a good idea to have too many braille patches end up in 2018.1. New native drivers as well as auto tethering feels ok to me. |
|
I just edited the what's new part to fix pres to press. |
|
Was more work going on in this PR, or should this be incubated now that 2018.1 is complete? |
|
I think this is ready to be incubated in order to get tested as broadly as possible. |
…d braille tables when in text controls (#12850) Fixes #12667 Summary of the issue: When entering text from a braille display NVDA reports that it is unsupported even though entered combination is valid. This check has been introduced in #7843 to prevent a situation in which someone uses contracted table outside text content and enters a combination which cannot be converted to a single character (a good example is entering dots 356 using English UK Grade 2 which is a contraction for "was"). The check however was too broad and didn't take into account that for literary / computer braille tables single combination of dots can either always be converted to a single character, or if not it does not result in multiple characters i.e. number sign. Description of how this pull request fixes the issue: Now the check applies only when the table in use is contracted.
Link to issue number:
Follow up of #6213/#7503
Fixes #7306.
Summary of the issue
Although the braille input system has been vastly improved due to support of contracted input, combining braille input was not yet supported. Also, even though letter quick navigation was supported in the forward direction, navigating backwards did not work as well.
Description of how this pull request fixes the issue:
This pr addresses the following:
No longer always send unicode characters to the system, but in the case of non-editable text, emulate a gesture. See Single letter navigation from a braille terminal #7306 (comment) . This means that pressing dot1257 in US English 8 dot, which translates to capital H, results in shift+h being sent to the system, which will go to the previous heading.
In the case of key emulation, make sure we only emulate one key stroke at once. This is different from sending unicode chars, which allowed sending whole words at once.
The point above means that we had to deal with contracted braille in non-editable cases. It turned out that the liblouis partial trans mode works perfectly for this. I tested with both Unified english braille code grade 2 and English US grade 2 that at least all the alphanumeric characters work. They do not translat to their contracted equivalents, so this seems to be the perfect method to use a contracted table in uncontracted mode .
Also discussed in Single letter navigation from a braille terminal #7306 is the possibility to use braille input together with modifiers. As noted by @jcsteh in Single letter navigation from a braille terminal #7306 (comment) , the implementation for this had to be quite different from Use braille display keys as modifier keys #6213, al though I have been able to integrate them as much as possible.
A. New, unbound scripts have been added to toggle control, shift, alt, windows and NVDA. Here, toggling means that the state of these keys will be enabled or disabled within the scope of braille input. For example, when you assign control to space+dot7 and you press space+dot7, than dot 125, control+h will be emulated. This also works for contracted tables due to partial translation mode.
B. The toggable modifier scripts integrate in the modifier system that already existed (Use braille display keys as modifier keys #6213/Basic support for braille display key modifiers #7503), For example, when key1 is bound to toggle control, key 2 to kb:shift and key3 to kb:down arrow, you can press and release key 1 to enable control, than key2+key3 to emulate control+shift+down arrow.
Testing performed:
Known issues with pull request:
Change log entry:
New features
Changes
Bug fixes
(Single letter navigation from a braille terminal #7306)