Skip to content

Commit

Permalink
Composable Shell touch keyboard: support emoji panel in Windows 10 Fa…
Browse files Browse the repository at this point in the history
…ll Creators Update. re nvaccess#7273.

In Windows 10 Fall Creators Update, people using United States English keyboard can use the keyboard to search for and enter emojis (Windows+period or Windows+semicolon). At the moment the app module has been added, with emoji candidates raising UIA element selected event.
Things to be aware of:
* When the emoji panel first opens, the first emoji isn't announced in some cases.
* When searching for emojis, intermediate search results are not announced.
  • Loading branch information
josephsl committed Jul 13, 2018
1 parent 9c3f5bc commit 3be8a9c
Showing 1 changed file with 32 additions and 0 deletions.
@@ -0,0 +1,32 @@
# App module for Composable Shell (CShell) input panel
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2017 NV Access Limited, Joseph Lee
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.

"""App module for Windows 10 new touch keyboard panel.
The chief feature is allowing NVDA to announce selected emoji when using the keyboard to search for and select one.
This is applicable on Windows 10 Fall Creators Update."""

import appModuleHandler
import api
import speech
import braille
import ui

class AppModule(appModuleHandler.AppModule):

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.
speech.cancelSpeech()
if obj.UIAElement.cachedClassName == "ListViewItem":
obj = obj.parent.previous.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()

0 comments on commit 3be8a9c

Please sign in to comment.