Skip to content

Commit

Permalink
Disable caret events in the UIA console (PR #9986)
Browse files Browse the repository at this point in the history
A regression caused during Python 3 migration.
NVDA was announcing the final character of the prompt after backspacing text quickly.
This can result in NVDA announcing "greater" after backspacing a line of text.

Disable caret events in the UIA console and legacy consoles.
This PR disables the caret movement event detection from #9933
  • Loading branch information
codeofdusk authored and feerrenrut committed Jul 31, 2019
1 parent be63d19 commit 288af0d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/NVDAObjects/UIA/winConsoleUIA.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,11 @@ def script_flush_queuedChars(self, gesture):
self._queuedChars = []
speech.clearTypedWordBuffer()

def _get_caretMovementDetectionUsesEvents(self):
"""Using caret events in consoles sometimes causes the last character of the
prompt to be read when quickly deleting text."""
return False

def _getTextLines(self):
# Filter out extraneous empty lines from UIA
ptr = self.UIATextPattern.GetVisibleRanges()
Expand Down
5 changes: 5 additions & 0 deletions source/NVDAObjects/window/winConsole.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ def reconnect():
self.startMonitoring()
core.callLater(200,reconnect)

def _get_caretMovementDetectionUsesEvents(self):
"""Using caret events in consoles sometimes causes the last character of the
prompt to be read when quickly deleting text."""
return False

@script(gestures=[
"kb:enter",
"kb:numpadEnter",
Expand Down

0 comments on commit 288af0d

Please sign in to comment.