UI Automation in Windows Console: add STABILIZE_DELAY and improve "speak typed words"#9651
Merged
Merged
Conversation
…legacy consoles). This helps NVDA process large amounts of text.
…ffer when enter or tab is pressed. Note: this will need to be investigated once nvaccess#8110 is merged.
Contributor
Author
LeonarddeR
reviewed
May 31, 2019
|
|
||
|
|
||
| class winConsoleUIA(Terminal): | ||
| STABILIZE_DELAY = 0.03 |
Collaborator
There was a problem hiding this comment.
Could you elaborate on how you decided to go with 0.03
Contributor
Author
There was a problem hiding this comment.
Value taken from legacy console code.
| "kb:enter", | ||
| "kb:numpadEnter", | ||
| "kb:tab", | ||
| "kb:control+c", |
Collaborator
There was a problem hiding this comment.
How could we make sure that this list of gestures is complete?
Contributor
Author
There was a problem hiding this comment.
It probably isn't unfortunately.
| def event_typedCharacter(self, ch): | ||
| if not ch.isspace(): | ||
| self._isTyping = True | ||
| if ch in ('\r', '\t'): |
Contributor
Author
There was a problem hiding this comment.
I haven't seen the console send a \n on return, but there's no reason why I couldn't add it...
michaelDCurran
approved these changes
Jun 3, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
Split from #9646 (builds on #9614).
Summary of the issue:
Currently, in consoles with UI Automation enabled:
_isTypingflag is not cleared on the console, so new text is not announced immediately.Description of how this pull request fixes the issue:
The
speech.curWordCharsbuffer is cleared when atypedCharacterof enter or tab is received. This prevents NVDA from speaking partially-typed words (during tab completion) or the last word of a command (when enter is pressed). This approach will need to be modified once #8110 is merged, as it significantly changes handling of typed words.The interrupt characters control+c, control+d, and control+break have been bound to the
script_clear_isTypingscript onNVDAObjects.UIA.winConsoleUIA.Testing performed:
Tested "speak typed words" on Windows 10 1803 and 1903. Tested console performance with many
textChangeevents on Windows 10 1903.Known issues with pull request:
See #9646 for all known console UIA issues to date.
Change log entry:
None.