-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
699 additions
and
693 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
# coding: utf-8 | ||
# BrailleExtender Addon for NVDA | ||
# This file is covered by the GNU General Public License. | ||
# See the file LICENSE for more details. | ||
# Copyright (C) 2016-2020 André-Abush Clause <[email protected]> | ||
# Copyright (C) 2016-2023 André-Abush Clause <[email protected]> | ||
# | ||
# Additional third party copyrighted code is included: | ||
# - *Attribra*: Copyright (C) 2017 Alberto Zanella <[email protected]> | ||
|
@@ -168,8 +169,6 @@ class GlobalPlugin(globalPluginHandler.GlobalPlugin): | |
noKC = None | ||
backupInputTable = brailleInput.handler.table | ||
backupMessageTimeout = None | ||
backupTether = utils.getTether() | ||
switchedMode = False | ||
|
||
def __init__(self): | ||
startTime = time.time() | ||
|
@@ -217,32 +216,13 @@ def event_gainFocus(self, obj, nextHandler): | |
rotorItem = 0 | ||
self.bindRotorGES() | ||
|
||
if config.conf["brailleExtender"]["reviewModeTerminal"]: | ||
if not self.switchedMode and obj.role == utils.get_control_type("ROLE_TERMINAL") and obj.hasFocus: | ||
if not hasattr(braille.handler, "TETHER_AUTO"): | ||
self.backupTether = utils.getTether() | ||
braille.handler.tether = braille.handler.TETHER_REVIEW | ||
else: | ||
if config.conf["braille"]["autoTether"]: | ||
self.backupTether = braille.handler.TETHER_AUTO | ||
config.conf["braille"]["autoTether"] = False | ||
else: | ||
self.backupTether = utils.getTether() | ||
braille.handler.setTether(braille.handler.TETHER_REVIEW, auto=False) | ||
braille.handler.handleReviewMove(shouldAutoTether=False) | ||
self.switchedMode = True | ||
elif self.switchedMode and obj.role != utils.get_control_type("ROLE_TERMINAL"): self.restorReviewCursorTethering() | ||
|
||
if "tabSize_%s" % addoncfg.curBD not in config.conf["brailleExtender"]["tables"].copy().keys(): self.onReload(None, 1) | ||
if self.hourDatePlayed: self.script_hourDate(None) | ||
if self.autoTestPlayed: self.script_autoTest(None) | ||
if braille.handler is not None and addoncfg.curBD != braille.handler.display.name: | ||
addoncfg.curBD = braille.handler.display.name | ||
self.onReload(None, 1) | ||
|
||
|
||
nextHandler() | ||
return | ||
|
||
def event_foreground(self, obj, nextHandler): | ||
if braille.handler._auto_scroll: | ||
|
@@ -318,27 +298,6 @@ def onTableDictionary(evt): | |
def onTemporaryDictionary(evt): | ||
gui.mainFrame._popupSettingsDialog(tabledictionaries.DictionaryDlg, _("Temporary dictionary"), "tmp") | ||
|
||
def restorReviewCursorTethering(self): | ||
if not self.switchedMode: return | ||
if not hasattr(braille.handler, "TETHER_AUTO"): | ||
braille.handler.tether = self.backupTether | ||
else: | ||
if self.backupTether == braille.handler.TETHER_AUTO: | ||
config.conf["braille"]["autoTether"] = True | ||
config.conf["braille"]["tetherTo"] = braille.handler.TETHER_FOCUS | ||
else: | ||
config.conf["braille"]["autoTether"] = False | ||
braille.handler.setTether(self.backupTether, auto=False) | ||
if self.backupTether == braille.handler.TETHER_REVIEW: | ||
braille.handler.handleReviewMove(shouldAutoTether=False) | ||
else: | ||
focus = api.getFocusObject() | ||
if focus.treeInterceptor and not focus.treeInterceptor.passThrough: | ||
braille.handler.handleGainFocus(focus.treeInterceptor,shouldAutoTether=False) | ||
else: | ||
braille.handler.handleGainFocus(focus,shouldAutoTether=False) | ||
self.switchedMode = False | ||
|
||
def getGestureWithBrailleIdentifier(self, gesture = ''): | ||
return ("br(%s):" % addoncfg.curBD if ':' not in gesture else '') + gesture | ||
|
||
|
@@ -1297,23 +1256,18 @@ def script_toggleSpeechHistoryMode(self, gesture): | |
__gestures["kb:shift+NVDA+p"] = "currentBrailleTable" | ||
__gestures["kb:shift+NVDA+i"] = "switchInputBrailleTable" | ||
__gestures["kb:shift+NVDA+u"] = "switchOutputBrailleTable" | ||
__gestures["kb:shift+NVDA+y"] = "autoScroll" | ||
__gestures["kb:nvda+k"] = "reload_brailledisplay1" | ||
__gestures["kb:nvda+shift+k"] = "reload_brailledisplay2" | ||
__gestures["kb:nvda+alt+h"] = "toggleDots78" | ||
__gestures["kb:nvda+j"] = "reload_brailledisplay1" | ||
__gestures["kb:nvda+shift+j"] = "reload_brailledisplay2" | ||
__gestures["kb:nvda+alt+f"] = "toggleBRFMode" | ||
__gestures["kb:nvda+windows+i"] = "advancedInput" | ||
__gestures["kb:nvda+windows+u"] = "undefinedCharsDesc" | ||
__gestures["kb:nvda+windows+h"] = "toggleOneHandMode" | ||
__gestures["kb:nvda+windows+k"] = "reloadAddon" | ||
__gestures["kb:volumeMute"] = "toggleVolume" | ||
__gestures["kb:volumeUp"] = "volumePlus" | ||
__gestures["kb:volumeDown"] = "volumeMinus" | ||
__gestures["kb:nvda+alt+u"] = "translateInBRU" | ||
__gestures["kb:nvda+alt+i"] = "charsToCellDescriptions" | ||
__gestures["kb:nvda+alt+o"] = "cellDescriptionsToChars" | ||
__gestures["kb:nvda+alt+y"] = "addDictionaryEntry" | ||
__gestures["kb:nvda+shift+j"] = "toggleAttribra" | ||
|
||
def terminate(self): | ||
if braille.handler.getTether() == "speech": | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#!/usr/bin/env python3 | ||
# coding: utf-8 | ||
import re | ||
|
||
HUC6_patterns = { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.