def event_UIA_elementSelected(self, obj, nextHandler):
# #7273: When this is fired on categories, the first emoji from the new category is selected but not announced.
# Therefore, move the navigator object to that item if possible.
# However, in recent builds, name change event is also fired.
# For consistent experience, report the new category first by traversing through controls.
speech.cancelSpeech()
# And no, if running on build 17040 and if this is typing suggestion, do not announce candidate window changes, as it is duplicate announcement and is anoying.
if obj.UIAElement.cachedAutomationID == "IME_Candidate_Window": return
candidate = obj
if obj.UIAElement.cachedClassName == "ListViewItem":
# The difference between emoji panel and suggestions list is absence of categories/emoji separation.
# If dealing with keyboard entry suggestions (build 17040 and later), return immediately.
candidate = obj.parent.previous
if candidate is None:
ui.message(obj.name)
nextHandler()
return
ui.message(candidate.name)
obj = candidate.firstChild
if obj is not None:
api.setNavigatorObject(obj)
obj.reportFocus()
braille.handler.message(braille.getBrailleTextForProperties(name=obj.name, role=obj.role, positionInfo=obj.positionInfo))
else:
# Translators: presented when there is no emoji when searching for one in Windows 10 Fall Creators Update and later.
ui.message(_("No emoji"))
nextHandler()
windowsinternal_composableshell_experiences_textinput_inputapp.py 文件源码
python
阅读 25
收藏 0
点赞 0
评论 0
评论列表
文章目录