To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=102525





------- Additional comments from [email protected] Tue Sep 15 11:27:00 +0000 
2009 -------
We need a change in one of the OpenOffice.org specific scripts of Orca in order
to have the notes text read.  Orca does recognize caret events only when they
were caused by the arrow keys.  In the slide show and therefore in the Presenter
Console, too, the arrow keys are already bound.  The change the current slide to
the next or previous slide.  Therefore I used VI like keys h and l to move the
caret backward or forward.  These, however, do not trigger the screen reader of
Orca.
There is a comment regarding this in orca/src/orca/default.py in
_presentTextAtNewCaretPosition near line 3412:

        # Guess why the caret moved and say something appropriate.
        # [[[TODO: WDW - this motion assumes traditional GUI
        # navigation gestures.  In an editor such as vi, line up and
        # down is done via other actions such as "i" or "j".  We may
        # need to think about this a little harder.]]]
        #

I attach a diff that translates the h and l keys to arrow left and right.  Note
that this is more a proof of concept.  I do not have the knowledge of Orca or
Python to make this fix.

diff --git a/src/orca/scripts/apps/soffice/script.py
b/src/orca/scripts/apps/soffice/script.py
index 96fd86d..c9700c2 100644
--- a/src/orca/scripts/apps/soffice/script.py
+++ b/src/orca/scripts/apps/soffice/script.py
@@ -2281,6 +2281,27 @@ class Script(default.Script):
             self._speakWriterText(event, textToSpeak)
             braille.displayRegions( \
                 self.brailleGenerator.generateBraille(event.source))
+        elif event_string in ["h", "H", "l", "L"] \
+                 and event.source.name.startswith("Paragraph") \
+                 and event.source.parent.name == "Presenter Notes":
+            # The presenter console can not use the left and right arrow keys
+            # for moving the caret (the arrow keys jump to the next or previous
+            # slide.)  It uses VI-like keys instead.
+            # Because the speaking of characters and words is triggered only by
+            # the arrow keys, we have to do a replacement of the key codes 
here.
+            # Additionally we translate between shift and control modifiers
+            # (plain key presesses move word wise and therefore have to be
+            # translated to CTRL, while the shift modifier moves the caret
+            # character wise and has to be removed.)
+            if event_string in ["h", "l"]:
+                orca_state.lastInputEvent.modifiers |= 
settings.CTRL_MODIFIER_MASK
+            else:
+                orca_state.lastInputEvent.modifiers &= 
~settings.CTRL_MODIFIER_MASK
+            if event_string in ["H", "L"]:
+                orca_state.lastNonModifierKeyEvent.event_string = "Left"
+            else:
+                orca_state.lastNonModifierKeyEvent.event_string = "Right"
+            default.Script.onCaretMoved(self, event)
         else:
             # The lists and combo boxes in the Formatting toolbar emit
             # object:active-descendant-changed events which cause us


---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to