Skip to content

Commit

Permalink
Add support for Windows Terminal (#10784)
Browse files Browse the repository at this point in the history
* Bring over ConsoleUIATextInfo refactoring from #10716.

* Add WinTerminalUIA

* Style.

* Review actions.

* microsoft/terminal#4495: support fixed GetVisibleRanges.

* KeyboardHandlerBasedTypedCharSupport -> EnhancedTermTypedCharSupport, add _shouldUseToUnicodeEx flag and set False for WinTerminalUIA.

* Update doc comments.

* Update copyrights.

* Review actions.

* Factor out bounding into separate method.

* Re-introduce KeyboardHandlerBasedTypedCharSupport.

* Fix UIA console support for newer Windows Console builds.

* Revert copyright header changes.

* Revert another no longer necessary copyright header change.

* Fix comments.

* Update docstring.

* Review actions.

* Update source/NVDAObjects/behaviors.py

Co-Authored-By: Leonard de Ruijter <leonardder@users.noreply.github.com>

* Add class docstring.

* Optimization: clear character buffers when reporting new lines.

This saves us from scanning the old and new lines twice in _calculateNewText (once for diffing and once for finding nonblank indices), and fixes typed word reporting for 21H1 console.

This new approach does not resolve #10942.

* Update inaccurate information in user guide.

Co-authored-by: Leonard de Ruijter <leonardder@users.noreply.github.com>
  • Loading branch information
codeofdusk and LeonarddeR authored Apr 6, 2020
1 parent f692c2f commit a0f9bea
Show file tree
Hide file tree
Showing 4 changed files with 221 additions and 154 deletions.
15 changes: 10 additions & 5 deletions source/NVDAObjects/UIA/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#NVDAObjects/UIA/__init__.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) 2009-2019 NV Access Limited, Joseph Lee, Mohammad Suliman, Babbage B.V., Leonard de Ruijter
# NVDAObjects/UIA/__init__.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) 2009-2020 NV Access Limited, Joseph Lee, Mohammad Suliman,
# Babbage B.V., Leonard de Ruijter, Bill Dengler

"""Support for UI Automation (UIA) controls."""

Expand Down Expand Up @@ -948,6 +949,10 @@ def findOverlayClasses(self,clsList):
):
from . import winConsoleUIA
winConsoleUIA.findExtraOverlayClasses(self, clsList)
elif UIAClassName == "TermControl":
from . import winConsoleUIA
clsList.append(winConsoleUIA.WinTerminalUIA)

# Add editableText support if UIA supports a text pattern
if self.TextInfo==UIATextInfo:
if UIAHandler.autoSelectDetectionAvailable:
Expand Down
Loading

0 comments on commit a0f9bea

Please sign in to comment.