Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix Windows Conhost
  • Loading branch information
codeofdusk committed Aug 27, 2022
commit 7551a459faaab342b3a1c68fdcc2d770147dc4f3
13 changes: 10 additions & 3 deletions source/UIAHandler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,12 @@
"Shell_SystemDialog", # Various dialogs in Windows 10 Settings app
]

textChangeUIAAutomationIDs = (
"Text Area", # Windows Console Host
)

textChangeUIAClassNames = (
"_WwG",
"ConsoleWindowClass",
"_WwG", # Microsoft Word
"TermControl",
"TermControl2"
)
Expand Down Expand Up @@ -494,6 +497,7 @@ def func():
group = (
self.localEventHandlerGroupWithTextChanges
if element.currentClassName in textChangeUIAClassNames
or element.CachedAutomationID in textChangeUIAAutomationIDs
else self.localEventHandlerGroup
)
self.addEventHandlerGroup(element, group)
Expand Down Expand Up @@ -531,7 +535,10 @@ def IUIAutomationEventHandler_HandleAutomationEvent(self,sender,eventID):
log.debug("HandleAutomationEvent: Ignored MenuOpenedEvent while focus event pending")
return
if eventID == UIA.UIA_Text_TextChangedEventId:
if sender.currentClassName in textChangeUIAClassNames:
if (
sender.currentClassName in textChangeUIAClassNames
or sender.CachedAutomationID in textChangeUIAAutomationIDs
):
NVDAEventName = "textChange"
else:
if _isDebug():
Expand Down