[nvda-addons] commit/controlUsageAssistant: josephsl: 2.0-dev - depending on whether you use focus or browse mode, custom help will be heard when dealing with edit fields, combo boxes, radio buttons and reading in general.

  • From: commits-noreply@xxxxxxxxxxxxx
  • To: nvda-addons@xxxxxxxxxxxxx
  • Date: Thu, 30 May 2013 10:07:17 -0000

1 new commit in controlUsageAssistant:

https://bitbucket.org/nvdaaddonteam/controlusageassistant/commits/8ad57b32b7b1/
Changeset:   8ad57b32b7b1
Branch:      VBuffHandling
User:        josephsl
Date:        2013-05-30 12:06:21
Summary:     2.0-dev - depending on whether you use focus or browse mode, 
custom help will be heard when dealing with edit fields, combo boxes, radio 
buttons and reading in general.

Affected #:  2 files

diff --git a/addon/globalPlugins/controlUsageAssistant/__init__.py 
b/addon/globalPlugins/controlUsageAssistant/__init__.py
index 5e348e8..ca87b80 100755
--- a/addon/globalPlugins/controlUsageAssistant/__init__.py
+++ b/addon/globalPlugins/controlUsageAssistant/__init__.py
@@ -67,12 +67,8 @@ class GlobalPlugin(globalPluginHandler.GlobalPlugin):
                        # General case: if we do have an entry for the 
appModule/process.
                        msg= ctrltypelist.helpMessages[index]
                elif (offset == 200 or offset == -200):
-                       # Special case: deal with virtual buffers.
-                       if curObj.treeInterceptor.passThrough:
-                               # Special case: focus mode message.
-                               msg = "You are in focus mode. To switch to 
browse mode, press NVDA+SPACE or escape key"
-                       else: # Another ternary operation - this time, find out 
if +-2xx index exists.
-                               msg = ctrltypelist.helpMessages[index] if index 
in ctrltypelist.helpMessages else ctrltypelist.helpMessages[curObj.role]
+                       # In case we're dealing with virtual buffer, call the 
below method.
+                       msg = self.VBufHelp(curObj, index)
                elif curObj.role == 8 and controlTypes.STATE_READONLY in 
curState:
                        # Special case 1: WE have encountered a read-only edit 
field.
                        msg = _(ctrltypelist.helpMessages[-8])
@@ -107,5 +103,26 @@ class GlobalPlugin(globalPluginHandler.GlobalPlugin):
        __gestures={
                "KB:NVDA+H":"obtainControlHelp",
                "KB:NVDA+G":"getAppName",
-                       }
-# End.
\ No newline at end of file
+       }
+       # Any exceptions to lookup keys goes here.
+       # First case: virtual buffer control exceptions.
+       VBufForms={206, 208, 213} # Forms encountered on webpages; add custom 
message form them in browse mode.
+       # And the function for handling these:
+       def VBufHelp(self, obj, i): # i = index.
+               if i in self.VBufForms:
+                       if not obj.treeInterceptor.passThrough:
+                               VBufmsg = ctrltypelist.helpMessages[i]
+                       else:
+                               VBufmsg = ctrltypelist.helpMessages[obj.role]
+                               VBufmsg += ". To switch to browse mode, press 
NVDA+SPACE or escape key"
+               elif i == 252:
+                       if not obj.treeInterceptor.passThrough:
+                               VBufmsg = ctrltypelist.helpMessages[252]
+                       else:
+                               VBufmsg = "To use browse mode and quick 
navigation keys to read the webpage, switch to browse mode by pressing 
NVDA+SPACE"
+               else:
+                       VBufmsg = ctrltypelist.helpMessages[obj.role]
+               return VBufmsg
+       
+       
+       # End.
\ No newline at end of file

diff --git a/addon/globalPlugins/controlUsageAssistant/ctrltypelist.py 
b/addon/globalPlugins/controlUsageAssistant/ctrltypelist.py
index dcea57c..9785af8 100755
--- a/addon/globalPlugins/controlUsageAssistant/ctrltypelist.py
+++ b/addon/globalPlugins/controlUsageAssistant/ctrltypelist.py
@@ -48,32 +48,26 @@ helpMessages = {
        64:"Press enter to interact with the embedded object. Press 
CONTROL+NVDA+SPACE to return to the website text",
        
        # 200: Virtual Buffer.
-       
-       # Translators: Help message for reading virtual buffer documents, such 
as webpages.
-       252:_("Use the browse mode and quick navigation commands to read 
through the webpage"),
+       206:"To select a radio button, switch to focus mode by pressing 
NVDA+SPACE or ENTER key",
+       208:"To type text into this edit field, switch to focus mode by 
pressing NVDA+SPACE or ENTER key",
+       213:"To select an item in the combo box, switch to focus mode by 
pressing NVDA+SPACE or ENTER key",
+       252:"Use the browse mode and quick navigation commands to read through 
the webpage",
        
        # App-specific case 1: AppeModule for app is present.
        
        # 300: Explorer (to deal with specific cases.
-       
-       # Translators: Help message for navigating start screen tiles (for 
Windows 8).
-       329:_("Use the arrow keys to move between start screen tiles"),
+       329:"Use the arrow keys to move between start screen tiles",
        
        # 400: Microsoft powerpoint (powerpnt):
-       
-       # Translators: Help message for viewing list of slides in Powerpoint.
        403:"Use up and down arrow keys to move between slides",
        
        
        # App-specific case 2: AppeModule for app is not present (use 
processes).
-       
        # -300: Excel.
        
-       # Translators: Help message for navigating spreadsheet cells in Excel.
        -329:_("Use the arrow keys to move between spreadsheet cells"),
        
        # -400: Adobe Reader (special case).
        
-       # Translators: Help message for reading PDF documents in Adobe Reader.
-       -452:_("Use the browse mode and quick navigation commands to read the 
PDF document")
+       -452:"Use the browse mode and quick navigation commands to read through 
the PDF document"
        }

Repository URL: https://bitbucket.org/nvdaaddonteam/controlusageassistant/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
----------------------------------------------------------------

NVDA add-ons Central: A list for discussing NVDA add-ons

To post a message, send an email to nvda-addons@xxxxxxxxxxxxx.

To unsubscribe, send an email with the subject line of "unsubscribe" (without 
quotes) to nvda-addons-request@xxxxxxxxxxxxx.

If you have questions for list moderators, please send a message to 
nvda-addons-moderators@xxxxxxxxxxxxx.

Community addons can be found here: http://addons.nvda-project.org

Other related posts:

  • » [nvda-addons] commit/controlUsageAssistant: josephsl: 2.0-dev - depending on whether you use focus or browse mode, custom help will be heard when dealing with edit fields, combo boxes, radio buttons and reading in general. - commits-noreply