Repository: nvaccess/nvda

Issue:
Braille input with NVDA isn't always correct
<!-- Please read the text in this edit field before filling it in.
Please thoroughly read NVDA's wiki article on how to fill in this template, including how to provide the required files.
Issues may be closed if the required information is not present.
https://github.com/nvaccess/nvda/blob/master/devDocs/githubIssueTemplateExplanationAndExamples.md
Please also note that the NVDA project has a Citizen and Contributor Code of Conduct which can be found at https://github.com/nvaccess/nvda/blob/master/CODE_OF_CONDUCT.md. NV Access expects that all contributors and other community members read and abide by the rules set out in this document while participating or contributing to this project. This includes creating or commenting on issues and pull requests. 

Each of the questions and sections below start with multiple hash symbols (#). Place your answers and information on the blank line below each question.
-->

### Steps to reproduce:

1. Open NVDA braille settings and choose, for example, "unified English braille grade 1" as an input braille table (generally relevant for all braille tables).
2. (for UEB) input with a braille display keyboard: ⠐⠣⠠⠉⠐⠜ (5-126-6-14-5-345). Another example: ⠐⠣⠼⠁⠐⠜ (5-126-3456-1-5-345). And many other examples.

### Actual behavior:

For the first example: NVDA says: "Input isn't supported" when I try to input the caps indicator (dot 6) after '(' (dots 5-126) and ignores my input.
For the second example: NVDA says "Input isn't supported" when I try to input the number sign (3456) after '(' (5-126) and ignores my input.
Generally: something goes wrong with input multicellular signs after parentheses, quotes, brackets, dashes and other symbols. 

### Expected behavior:

Input should be processed correctly, number signs, caps indicators and other parts of multicellular symbols shouldn't be ignored.


### System configuration
#### NVDA installed/portable/running from source:
Installed
#### NVDA version:
2021.1
#### Windows version:
10
#### Name and version of other software in use when reproducing the issue:

#### Other information about your system:
I use the Focus 40 (4th generation) braille display.
### Other questions
#### Does the issue still occur after restarting your computer?
Yes
#### Have you tried any other versions of NVDA? If so, please report their behaviors.

#### If add-ons are disabled, is your problem still occurring?
Yes (including BrailleExtender)
#### Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?

### Other comments

I've found this problem when working on Russian Liblouis tables, but it's actual for all input tables.
It doesn't seem to be a problem of Liblouis because back translation in other programs used Liblouis (including lou_translate.exe) works correctly. I think that the problem is in how NVDA processes Liblouis tables.


Discussion:
@leonardder Do you have any insight into this issue? I'd love to know if someone with a different braille display can reproduce the issue.
Reopened due to #12742 being reverted by #12789

Resolving patch:
diff --git a/source/brailleInput.py b/source/brailleInput.py
--- a/source/brailleInput.py
+++ b/source/brailleInput.py
@@ -1,9 +1,7 @@
-# -*- coding: UTF-8 -*-
-# brailleInput.py
 # A part of NonVisual Desktop Access (NVDA)
 # This file is covered by the GNU General Public License.
 # See the file COPYING for more details.
-# Copyright (C) 2012-2019 NV Access Limited, Rui Batista, Babbage B.V.
+# Copyright (C) 2012-2021 NV Access Limited, Rui Batista, Babbage B.V.
 
 import os.path
 import time
@@ -253,7 +251,7 @@ def input(self, dots: int):
 			if self._translate(endWord):
 				if not endWord:
 					self.cellsWithText.add(pos)
-			elif self.bufferText and not self.useContractedForCurrentFocus:
+			elif self.bufferText and not self.useContractedForCurrentFocus and self._table.contracted:
 				# Translators: Reported when translation didn't succeed due to unsupported input.
 				speech.speakMessage(_("Unsupported input"))
 				self.flushBuffer()


Test patch: