Skip to content
Merged
Show file tree
Hide file tree
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
winConsoleUIA.winConsoleUIA -> winConsoleUIA.WinConsoleUIA for consis…
…tency.
  • Loading branch information
codeofdusk committed Jun 17, 2019
commit 3ce06071b7dfec0c93bd6f44ac68efde984c4063
10 changes: 7 additions & 3 deletions source/NVDAObjects/UIA/winConsoleUIA.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,16 @@ def _get_focusRedirect(self):
To work around this, we must redirect focus to the console text area.
"""
for child in self.children:
if isinstance(child, winConsoleUIA):
if isinstance(child, WinConsoleUIA):
return child
return None


class winConsoleUIA(Terminal):
class WinConsoleUIA(Terminal):
#: Disable the name as it won't be localized
name = ""
#: Only process text changes every 30 ms, in case the console is getting
#: a lot of text.
STABILIZE_DELAY = 0.03
_TextInfo = consoleUIATextInfo
_queuedChars = []
Expand Down Expand Up @@ -271,6 +275,6 @@ def _findNonBlankIndices(self, lines):

def findExtraOverlayClasses(obj, clsList):
if obj.UIAElement.cachedAutomationId == "Text Area":
clsList.append(winConsoleUIA)
clsList.append(WinConsoleUIA)
elif obj.UIAElement.cachedAutomationId == "Console Window":
clsList.append(consoleUIAWindow)
4 changes: 2 additions & 2 deletions source/keyboardHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def internal_keyDownEvent(vkCode,scanCode,extended,injected):
# #6017: handle typed characters in Win10 RS2 and above where we can't detect typed characters in-process
# This code must be in the 'finally' block as code above returns in several places yet we still want to execute this particular code.
focus=api.getFocusObject()
from NVDAObjects.UIA.winConsoleUIA import winConsoleUIA
from NVDAObjects.UIA.winConsoleUIA import WinConsoleUIA
if (
# This is only possible in Windows 10 RS2 and above
winVersion.isWin10(1703)
Expand All @@ -212,7 +212,7 @@ def internal_keyDownEvent(vkCode,scanCode,extended,injected):
# or the focus is within a UWP app, where WM_CHAR never gets sent
or focus.windowClassName.startswith('Windows.UI.Core')
#Or this is a UIA console window, where WM_CHAR messages are doubled
or isinstance(focus, winConsoleUIA)
or isinstance(focus, WinConsoleUIA)
)
):
keyStates=(ctypes.c_byte*256)()
Expand Down