Skip to content

Commit

Permalink
More improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammad-suliman committed May 21, 2022
1 parent b736ee5 commit 5178f2d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 70 deletions.
73 changes: 8 additions & 65 deletions addon/appModules/zoom.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
from logHandler import log
import config
import api
import controlTypes
try:
from controlTypes import role
except ImportError:
pass
import mouseHandler
import winUser
import addonHandler
Expand All @@ -25,6 +20,12 @@
import datetime
import gui
from gui import NVDASettingsDialog
import controlTypes as ct
if hasattr(ct, 'Role'):
roles = ct.Role
else:
shortRolePairs = [(x.split("ROLE_")[1], getattr(ct, x)) for x in dir(ct) if x.startswith("ROLE_")]
roles = type('Enum', (), dict(shortRolePairs))


def initConfiguration():
Expand Down Expand Up @@ -161,11 +162,7 @@ def event_alert(self, obj, nextHandler):

def event_nameChange(self, obj, nextHandler):
nextHandler()
try:
ROLE_STATICTEXT = role.Role.STATICTEXT
except NameError:
ROLE_STATICTEXT = controlTypes.ROLE_STATICTEXT
if obj.role == ROLE_STATICTEXT and obj.windowClassName == "zBubbleBaseClass":
if obj.role == roles.STATICTEXT and obj.windowClassName == "zBubbleBaseClass":
if self.ricievedChatPrefix:
obj.name = self.chatPrefixText + ": " + obj.name
self.ricievedChatPrefix = False
Expand All @@ -174,10 +171,7 @@ def event_nameChange(self, obj, nextHandler):
self.chatPrefixText = obj.name
self.ricievedChatPrefix = True
return
try:
obj.role = role.Role.ALERT
except NameError:
obj.role = controlTypes.ROLE_ALERT
obj.role = roles.ALERT
eventHandler.queueEvent("alert", obj)

scriptCategory = SCRCAT_ZOOMENHANCEMENTS
Expand Down Expand Up @@ -423,57 +417,6 @@ def script_toggleAlertsMode(self, gesture):
config.conf["zoomEnhancements"]["alertsReportingMode"] = alertModeToLabel[currentMode]
ui.message(alertModeToLabel[currentMode])

@script(
# Translators: a description for a command to move the focus in / out of the remote controlled screen
description=_("Moves focus in / out of the remote controlled screen"),
gesture="kb:NVDA+o"
)
def script_remoteControl(self, gesture):
focus = api.getFocusObject()
try:
ROLE_UNKNOWN = role.Role.UNKNOWN
except NameError:
ROLE_UNKNOWN = controlTypes.ROLE_UNKNOWN
if focus.windowClassName.startswith("CASView_0x") and focus.role == ROLE_UNKNOWN:
try:
newFocus = focus.parent.parent.parent.parent.parent.previous.firstChild.firstChild.firstChild
self._clickObject(newFocus)
return
except:
return
shareContentWindow = self._getShareContentWindow()
if shareContentWindow:
self._clickObject(shareContentWindow)
else:
log.debugWarning("Couldn't find share content window")

def _clickObject(self, obj):
api.moveMouseToNVDAObject(obj)
mouseHandler.executeMouseEvent(
winUser.MOUSEEVENTF_LEFTDOWN, 0, 0)
mouseHandler.executeMouseEvent(
winUser.MOUSEEVENTF_LEFTUP, 0, 0)

def _getShareContentWindow(self):
focus = api.getFocusObject()
try:
ROLE_WINDOW = role.Role.WINDOW
except NameError:
ROLE_WINDOW = controlTypes.ROLE_WINDOW
try:
shareContentWindow = focus.parent.parent
if shareContentWindow.name == "Share Content" and shareContentWindow.role == ROLE_WINDOW:
return shareContentWindow
except:
pass
try:
meetingToolsWindow = focus.parent.parent.parent
if meetingToolsWindow.name != "Meeting Tools":
meetingToolsWindow = focus.parent.parent.parent.parent.parent
return meetingToolsWindow.next.firstChild.firstChild
except:
pass

def _handleChatMessage(self, alert):
now = datetime.datetime.now()
now = str(now.hour) + ":" + str(now.minute)
Expand Down
11 changes: 6 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

By: Mohamad Suliman and Eilana Benish

This add-on will improve the experience of using Zoom for NVDA users by providing keyboard shortcuts to Handle alerts for Different events While In a meeting, make the process of remote control much more accessible and smoother, and more...
This add-on improves the experience of using Zoom for NVDA users by providing keyboard shortcuts to Handle alerts for Different events While In a meeting, provides an alternative way to view the chat history in a meeting to overcome accessibility issues found sometimes in the native chat view of Zoom, and more...

## keyboard shortcuts for controlling alerts In meetings

Expand Down Expand Up @@ -31,7 +31,7 @@ The following shortcuts can be used to toggle on / off the announcements of each

Note that you need to leave reporting all alert types selected (in Zoom accessibility settings) to have the add-on function as expected.

## Keyboard shortcut for Opening add on Dialogue
## Keyboard shortcut for Opening the add on Dialogue

NVDA + Z Opens the add-on dialog !

Expand All @@ -44,9 +44,10 @@ Using this dialog you can :

## Remote control

after a remote control permission is granted, NVDA + O will move the focus in /Out of the remote controlled screen.
It has ben found out that Zoom now has a dedicated keyboard shortcuts to handle the remote control in an accessible manar. Use the following keyboard shortcuts to:

Note that the focus should be on one of the meeting controls to be able to remote control the other screen!
* Alt + Shift + r: to start remote control. Note that you need to have the permision of the remote controlled computer user to be able to proceed
* Alt + Shift + g: to give up remote control or to revoke it

## Chat history dialog

Expand All @@ -56,4 +57,4 @@ The dialog is very simplistic, it has a list of the sent chat messages with thei

## An Important note

Currently the feature of custom alerts mode where the user can choose which alerts they want to have and which not works with Zoom only when the user interface language is set to english.
Currently, the feature of custom alerts mode (where the user can choose which alerts they want to have and which not) works with Zoom only when the user interface language is set to english.

0 comments on commit 5178f2d

Please sign in to comment.