Ticket #193: clipboard_speaking.patch
| File clipboard_speaking.patch, 2.4 KB (added by aleksey_s, 3 years ago) |
|---|
-
api.py
276 276 return True 277 277 return False 278 278 279 def getClipData(): 280 """Receives text from the windows clipboard. 281 @returns: Clipboard text 282 @rtype: string 283 """ 284 text = "" 285 win32clipboard.OpenClipboard() 286 try: 287 text = win32clipboard.GetClipboardData(win32con.CF_UNICODETEXT) 288 finally: 289 win32clipboard.CloseClipboard() 290 return text 291 279 292 def getStatusBar(): 280 293 """Obtain the status bar for the current foreground object. 281 294 @return: The status bar object or C{None} if no status bar was found. -
appModules/_default.py
805 805 pythonConsole.consoleUI.updateNamespaceSnapshotVars() 806 806 pythonConsole.activate() 807 807 script_activatePythonConsole.__doc__ = _("Activates the NVDA Python Console, primarily useful for development") 808 809 def script_speakClipboardText(self,keyPress): 810 text = api.getClipData() 811 if isinstance(text,basestring) and len(text)>0 and not text.isspace(): 812 if len(text) < 1024: 813 speech.speakMessage(text) 814 else: 815 speech.speakMessage(_("The clipboard contains a big portion of text. it is %s characters long") % len(text)) 816 else: 817 speech.speakMessage(_("The clipboard is empty")) 818 script_speakClipboardText.__doc__ = _("Speaks the windows clipboard text content without touching it") 819 No newline at end of file -
appModules/_default_desktop.kbd
79 79 Control+NVDA+z=activatePythonConsole 80 80 extendedDivide=leftMouseClick 81 81 multiply=rightMouseClick 82 NVDA+c=speakClipboardText -
appModules/_default_laptop.kbd
118 118 Control+NVDA+d=activateDocumentFormattingDialog 119 119 Control+NVDA+c=saveConfiguration 120 120 Control+NVDA+r=revertToSavedConfiguration 121 Control+NVDA+z=activatePythonConsole 122 No newline at end of file 121 Control+NVDA+z=activatePythonConsole 122 NVDA+c=speakClipboardText

