-
-
Notifications
You must be signed in to change notification settings - Fork 654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Windows Terminal #10784
Conversation
See test results for failed build of commit 89b418db2e |
@LeonarddeR @michaelDCurran Could you please have another look? I think this is now ready for merge, and will become functional with microsoft/terminal#4826. |
The PR description has also been updated with additional changes and testing notes. |
Cc @feerrenrut and @michaelDCurran Could this PR please be reviewed? |
I haven't yet looked through the changes carefully, my initial impression is concern for regressions. Anything you can do here to reduce the chance of regression (particularly in windows console) will help us to get confidence in this PR. We are planning to try to clear the backlog of PR's soon, we will initially focus on bug fixes and small PR's. |
Chance of regressions seems fairly low, as the new terminal and old console functionality are in separate subclasses ( |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tested this on insider builds of Windows 2004?
Hi, or better yet, it might be best to call it 21H1, as we don’t know if it’s going to be called 2103 or 2104 – won’t find out until December at the earliest. Thanks.
|
@LeonarddeR I think all requested changes have now been made. |
… add _shouldUseToUnicodeEx flag and set False for WinTerminalUIA.
I've rebased this PR on master as it's been open for a while. @LeonarddeR Could you please have another look? |
hi @codeofdusk |
Yes, awaiting review from @LeonarddeR and @michaelDCurran. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay, this shortens the diff significantly, that's good!
Co-Authored-By: Leonard de Ruijter <[email protected]>
@LeonarddeR @feerrenrut Could you please have another look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @codeofdusk
I shall try to review this on Monday. |
Perhaps in a separate PR, we may need to rethink how and when we clear the typed word buffer for new text lines in STR:
NVDA says "qgit", not "git". For reference, the 21H1 console ( |
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 nvaccess#10942.
@codeofdusk I'm happy with this. Are you ready for me to merge this? |
Yes – Future changes, if necessary, will be made in subsequent PRs.
|
Link to issue number:
Closes #10305. Supersedes #10716 for now.
Summary of the issue:
The new Windows Terminal does not support automatic readout, suppression of password characters, and other terminal niceties.
Since newer Windows Console builds correctly set the end of text ranges as exclusive, NVDA's current UIA console workarounds produce incorrect behaviour in these builds.
Description of how this pull request fixes the issue:
consoleUIATextInfo
workarounds into a subclass. This will be useful for Windows 10 version 21H1, where making UIA default in consoles will be strongly worth considering.winConsoleUIA.WinTerminalUIA
class and attaches it to Windows Terminal controls.IUIAutomationTextPattern::GetVisibleRanges
for consoles returning one contiguous range (see UIA: Fix GetVisibleRanges() and add Tracing microsoft/terminal#4495).NVDAObjects.behaviors.EnhancedTermTypedCharSupport
class, whichKeyboardHandlerBasedTypedCharSupport
now subclasses.textInfo
implementation to use based on the number of visible ranges presented by the console (newer builds present just one range).Testing performed:
Tested that Windows Terminal controls correctly receive the
WinTerminalUIA
type and that consoles work as expected (including keyboard support enhancements).Tested that in newer Windoes Console (built from the terminal
master
branch), bounding works as expected even after the window is maximized and a large amount of text is written.Tested that automatic readout, password suppression, and typed character reporting are functional in the Windows Terminal build in microsoft/terminal#2447.
Tested that the correct
textInfo
implementation is chosen for the included console on Windows 10 version 1909 Vs. the latest open console from Microsoft.Known issues with pull request:
None.
Change log entry:
== new features ==