Skip to content

Commit

Permalink
Possible fix for issue described in nvaccess#1348 comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
codeofdusk committed Aug 13, 2019
1 parent ac5ab40 commit 82d58d2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
5 changes: 0 additions & 5 deletions source/NVDAObjects/UIA/winConsoleUIA.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,11 +273,6 @@ class WinConsoleUIA(KeyboardHandlerBasedTypedCharSupport):
#: the caret in consoles can take a while to move on Windows 10 1903 and later.
_caretMovementTimeoutMultiplier = 1.5

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
return (
Expand Down
5 changes: 5 additions & 0 deletions source/NVDAObjects/behaviors.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,11 @@ def event_loseFocus(self):
super(Terminal, self).event_loseFocus()
self.stopMonitoring()

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


class KeyboardHandlerBasedTypedCharSupport(Terminal):
"""A Terminal object that also provides typed character support for
Expand Down
5 changes: 0 additions & 5 deletions source/NVDAObjects/window/winConsole.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,6 @@ 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 82d58d2

Please sign in to comment.