Repository navigation
Prototype for Windows Terminal: Use notifications instead of monitoring for new text #14047
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
Changes from 1 commit
c5a4a8c
60d4b36
5054d0c
f9771b3
2cafc67
f39870b
1176505
9735811
3b678c4
f79d0f6
a2bff15
40ca1e0
73b5367
497e3f3
2cba013
69f621e
81fe5e0
6a1bbb2
e043da9
b6620a7
f992db5
1b915a0
715168b
5139a56
b706a19
5fe8559
f6f6563
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Co-authored-by: Bill Dengler <codeofdusk@gmail.com>
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,7 +16,7 @@ | |
| from UIAHandler.utils import _getConhostAPILevel | ||
| from UIAHandler.constants import WinConsoleAPILevel | ||
| from . import UIA, UIATextInfo | ||
| from ..behaviors import EnhancedTermTypedCharSupport, KeyboardHandlerBasedTypedCharSupport | ||
| from ..behaviors import KeyboardHandlerBasedTypedCharSupport | ||
| from ..window import Window | ||
|
|
||
|
|
||
|
|
@@ -427,4 +427,14 @@ class WinTerminalUIA(UIA): | |
| announceNewLineText=False | ||
|
|
||
| def event_UIA_notification(self, notificationKind, notificationProcessing, displayString, activityId): | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can this function header get typing information added?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no typing on this method signature in the superclass either.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add types where they are known/obvious/simple? |
||
| speech.speakText(displayString) | ||
| # Do not announce output from background terminals. | ||
| if self.appModule != api.getFocusObject().appModule: | ||
| return | ||
| # microsoft/terminal#12358: Automatic reading of terminal output | ||
| # is provided by UIA notifications. If the user does not want | ||
| # automatic reporting of dynamic output, suppress this notification. | ||
| if not config.conf["presentation"]["reportDynamicContentChanges"]: | ||
| return | ||
| for line in displayString.splitlines(): | ||
| if line: # Don't say "blank" during autoread | ||
| speech.speakText(line) | ||
Uh oh!
There was an error while loading. Please reload this page.