Skip to content

Commit ac4a950

Browse files
authored
Merge 3dfd82e into 345154a
2 parents 345154a + 3dfd82e commit ac4a950

2 files changed

Lines changed: 34 additions & 3 deletions

File tree

source/globalCommands.py

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
# See the file COPYING for more details.
55
# Copyright (C) 2006-2023 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Rui Batista, Joseph Lee,
66
# Leonard de Ruijter, Derek Riemer, Babbage B.V., Davy Kager, Ethan Holliger, Łukasz Golonka, Accessolutions,
7-
# Julien Cochuyt, Jakub Lukowicz, Bill Dengler, Cyrille Bougot, Rob Meredith, Luke Davis
7+
# Julien Cochuyt, Jakub Lukowicz, Bill Dengler, Cyrille Bougot, Rob Meredith, Luke Davis,
8+
# Burman's Computer and Education Ltd.
89

910
import itertools
1011
from typing import (
@@ -35,7 +36,10 @@
3536
import gui
3637
import wx
3738
import config
38-
from config.configFlags import TetherTo
39+
from config.configFlags import (
40+
TetherTo,
41+
ShowMessages,
42+
)
3943
import winUser
4044
import appModuleHandler
4145
import winKernel
@@ -3260,6 +3264,31 @@ def script_braille_cycleCursorShape(self, gesture):
32603264
# Translators: Reports which braille cursor shape is activated.
32613265
ui.message(_("Braille cursor %s") % shapeMsg)
32623266

3267+
@script(
3268+
# Translators: Input help mode message for toggle braille show messages command.
3269+
description=_("Cycle through the braille show messages modes"),
3270+
category=SCRCAT_BRAILLE
3271+
)
3272+
def script_braille_cycleShowMessages(self, gesture):
3273+
"""Set next state of braille show messages and reports it with ui.message."""
3274+
values = [x.value for x in ShowMessages]
3275+
index = values.index(
3276+
config.conf["braille"]["showMessages"]
3277+
)
3278+
newIndex = (index + 1) % len(values)
3279+
newValue = values[newIndex]
3280+
config.conf["braille"]["showMessages"] = newValue
3281+
# Translators: Reports which show braille message mode is used
3282+
# (disabled, timeout or indefinitely).
3283+
ui.message(
3284+
_(
3285+
"Braille show messages %s"
3286+
)
3287+
% ShowMessages(
3288+
newValue
3289+
).displayString
3290+
)
3291+
32633292
@script(
32643293
# Translators: Input help mode message for report clipboard text command.
32653294
description=_("Reports the text on the Windows clipboard"),

user_docs/en/userGuide.t2t

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1585,9 +1585,11 @@ The selection indicator is not affected by this option, it is always dots 7 and
15851585
==== Show Messages ====[BrailleSettingsShowMessages]
15861586
This is a combobox that allows you to select if NVDA should display braille messages and when they should disappear automatically.
15871587

1588+
To toggle show messages from anywhere, please assign a custom gesture using the [Input Gestures dialog #InputGestures].
1589+
15881590
==== Message Timeout (sec) ====[BrailleSettingsMessageTimeout]
15891591
This option is a numerical field that controls how long NVDA messages are displayed on the braille display.
1590-
The NVDA message is imediately dismissed when pressing a routing key on the braille display, but appears again when pressing a corresponding key which triggers the message.
1592+
The NVDA message is immediately dismissed when pressing a routing key on the braille display, but appears again when pressing a corresponding key which triggers the message.
15911593
This option is shown only if "Show Messages" is set to "Use timeout".
15921594

15931595
%kc:setting

0 commit comments

Comments
 (0)