Skip to content

Commit

Permalink
Added support for the new on-demand speech mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdaweb committed Dec 19, 2023
1 parent 0e302f8 commit 729dae8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions addon/globalPlugins/inputLock.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
import config
from gui import guiHelper
import wx
import versionInfo
from gui import NVDASettingsDialog
from gui.settingsDialogs import SettingsPanel
from scriptHandler import script
addonHandler.initTranslation()
speakOnDemand = {"speakOnDemand": True} if versionInfo.version_year >= 2024 else {}

confspec = {
"blockMouseAtStartup": "boolean(default=false)",
Expand Down Expand Up @@ -95,7 +97,8 @@ def event_foreground(self, obj, next):
@script(
# TRANSLATORS: gesture description for Input gestures dialog
description=_("Toggle input lock"),
category=globalCommands.SCRCAT_INPUT)
category=globalCommands.SCRCAT_INPUT,
**speakOnDemand)
def script_inputLock(self, gesture):
self.locked = not self.locked
self.gesture = gesture
Expand All @@ -118,7 +121,8 @@ def script_inputLock(self, gesture):
@script(
# TRANSLATORS: gesture description for Input gestures dialog
description=_("Toggle mouse lock"),
category=globalCommands.SCRCAT_INPUT)
category=globalCommands.SCRCAT_INPUT,
**speakOnDemand)
def script_mouseLock(self, gesture):
self.mouseLocked = not self.mouseLocked
if self.mouseLocked:
Expand Down

0 comments on commit 729dae8

Please sign in to comment.