Skip to content

Commit

Permalink
Fixes to reportCurrentLine's spelling functionality. Incubates #6894
Browse files Browse the repository at this point in the history
…(issues #6726, #6893)
  • Loading branch information
jcsteh committed Mar 20, 2017
2 parents 231f5b9 + e172856 commit d472547
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions source/globalCommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,13 @@ def script_reportCurrentLine(self,gesture):
except (NotImplementedError, RuntimeError):
info=obj.makeTextInfo(textInfos.POSITION_FIRST)
info.expand(textInfos.UNIT_LINE)
if scriptHandler.getLastScriptRepeatCount()==0:
scriptCount=scriptHandler.getLastScriptRepeatCount()
if scriptCount==0:
speech.speakTextInfo(info,unit=textInfos.UNIT_LINE,reason=controlTypes.REASON_CARET)
else:
speech.speakSpelling(info.text)
speech.spellTextInfo(info,useCharacterDescriptions=scriptCount>1)
# Translators: Input help mode message for report current line command.
script_reportCurrentLine.__doc__=_("Reports the current line under the application cursor. Pressing this key twice will spell the current line")
script_reportCurrentLine.__doc__=_("Reports the current line under the application cursor. Pressing this key twice will spell the current line. Pressing three times will spell the line using character descriptions.")
script_reportCurrentLine.category=SCRCAT_SYSTEMCARET

def script_leftMouseClick(self,gesture):
Expand Down
2 changes: 1 addition & 1 deletion user_docs/en/userGuide.t2t
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ NVDA provides the following key commands in relation to the system caret:
%kc:beginInclude
|| Name | Desktop key | Laptop key | Description |
| Say all | NVDA+downArrow | NVDA+a | Starts reading from the current position of the system caret, moving it along as it goes |
| Read current line | NVDA+upArrow | NVDA+l | Reads the line where the system caret is currently situated. Pressing twice spells the line. |
| Read current line | NVDA+upArrow | NVDA+l | Reads the line where the system caret is currently situated. Pressing twice spells the line. Pressing three times spells the line using character descriptions. |
| Read current text selection | NVDA+Shift+upArrow | NVDA+shift+s | Reads any currently selected text |
| Next sentence | alt+downArrow | alt+downArrow | Moves the caret to the next sentence and announces it. (only supported in Microsoft Word and Outlook) |
| Previous sentence | alt+upArrow | alt+upArrow | Moves the caret to the previous sentence and announces it. (only supported in Microsoft Word and Outlook) |
Expand Down

0 comments on commit d472547

Please sign in to comment.