-
-
Notifications
You must be signed in to change notification settings - Fork 738
Add ability to scroll automatically in braille #19126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 85 commits
5b411ab
ab1056e
098bedc
b997c66
7e89c2c
d380d88
01e4f87
79d83f9
c3c7e47
f033be7
5b6fca5
572f1af
e1e8b70
7ab4eb2
3d60cd1
43335b5
6873bae
17d52c6
3463e1d
a1a748c
22515bb
5a26e26
96bab6d
ca22023
6920874
59b1694
a1b816b
55cd1bb
2b4d750
619c02c
3dce11a
e1acf80
a2c7611
a4e11b5
9032f60
ff6880d
a23a05a
bc64da2
3207953
00ab1ae
3efcc0e
f3a2041
0734bb6
a6a142a
367a301
dbcffc5
a8f2459
f8630ea
87f6ec8
3d754c3
b3052eb
72cc841
c19039d
8f5eb26
b2a18f1
f3758fb
b4c28b1
ece83ae
f5c6402
004b3f1
696ae2d
1604a3a
16acdf4
811e48b
1b9a677
8dfe987
d7977d1
9c419c9
73c2406
f466215
2b81e48
62520ec
eb12323
662cbc6
039764d
4b2444f
9a5182d
0255812
057dd7a
c7464ac
c7c0c86
5f61788
1e9af48
d152666
899b083
6102d0e
e614982
597abaf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -844,6 +844,63 @@ def script_toggleReportSpellingErrorsInBraille(self, gesture: inputCore.InputGes | |
| # Translators: Message presented when turning off reporting spelling errors or grammar in braille. | ||
| ui.message(_("Report errors in braille off")) | ||
|
|
||
| @script( | ||
| # Translators: Input help mode message for command to toggle braille automatic scroll. | ||
| description=_("Toggles braille automatic scroll"), | ||
| category=SCRCAT_BRAILLE, | ||
| ) | ||
| def script_toggleBrailleAutoScroll(self, gesture: inputCore.InputGesture): | ||
| shouldEnableAutoScroll = braille.handler._autoScrollCallLater is None | ||
| timeout = 0 | ||
| if shouldEnableAutoScroll: | ||
| # Translators: Message reported when automatic scrolling has been enabled in braille. | ||
| ui.message(_("Automatic scrolling enabled")) | ||
| if not ( | ||
| config.conf["braille"]["showMessages"] == ShowMessages.DISABLED | ||
| or config.conf["braille"]["mode"] == BrailleMode.SPEECH_OUTPUT.value | ||
| ): | ||
| timeout = config.conf["braille"]["messageTimeout"] * 1000 | ||
| else: | ||
| # Translators: Message reported when automatic scrolling has been disabled in braille. | ||
| ui.message(_("Automatic scrolling disabled")) | ||
| core.callLater(timeout, braille.handler.autoScroll, shouldEnableAutoScroll) | ||
|
|
||
| @script( | ||
| # Translators: Input help mode message for command to increase the rate for braille automatic scroll. | ||
| description=_("Increases the rate for braille automatic scroll"), | ||
| category=SCRCAT_BRAILLE, | ||
| ) | ||
| def script_increaseBrailleAutoScrollRate(self, gesture: inputCore.InputGesture): | ||
| maxRate = int( | ||
| config.conf.getConfigValidation( | ||
| ("braille", "autoScrollRate"), | ||
| ).kwargs["max"], | ||
| ) | ||
| if config.conf["braille"]["autoScrollRate"] + 0.5 <= maxRate: | ||
| config.conf["braille"]["autoScrollRate"] += 0.5 | ||
| else: | ||
| config.conf["braille"]["autoScrollRate"] = maxRate | ||
| rate = f"{config.conf['braille']['autoScrollRate']:.1f}" | ||
| ui.message(rate) | ||
|
|
||
| @script( | ||
| # Translators: Input help mode message for command to decrease the rate for braille automatic scroll. | ||
| description=_("Decreases the rate for braille automatic scroll"), | ||
| category=SCRCAT_BRAILLE, | ||
| ) | ||
| def script_decreaseBrailleAutoScrollRate(self, gesture: inputCore.InputGesture): | ||
| minRate = int( | ||
| config.conf.getConfigValidation( | ||
| ("braille", "autoScrollRate"), | ||
| ).kwargs["min"], | ||
| ) | ||
| if config.conf["braille"]["autoScrollRate"] - 0.5 >= minRate: | ||
| config.conf["braille"]["autoScrollRate"] -= 0.5 | ||
| else: | ||
| config.conf["braille"]["autoScrollRate"] = minRate | ||
| rate = f"{config.conf['braille']['autoScrollRate']:.1f}" | ||
| ui.message(rate) | ||
|
||
|
|
||
| @script( | ||
| # Translators: Input help mode message for toggle report pages command. | ||
| description=_("Toggles on and off the reporting of pages"), | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -3449,6 +3449,8 @@ class DocumentNavigationPanel(SettingsPanel): | |||||||
| helpId = "DocumentNavigation" | ||||||||
|
|
||||||||
| def makeSettings(self, settingsSizer: wx.BoxSizer) -> None: | ||||||||
| shouldDebugGui = gui._isDebug() | ||||||||
| startTime = time.time() if shouldDebugGui else 0 | ||||||||
|
Comment on lines
+3452
to
+3453
|
||||||||
| shouldDebugGui = gui._isDebug() | |
| startTime = time.time() if shouldDebugGui else 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Were these lines introduced intentionally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, they are accidental changes. Sorry.
Copilot
AI
Dec 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable startTime is not used.
| startTime = time.time() if shouldDebugGui else 0 |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -6,6 +6,7 @@ | |||||||||
|
|
||||||||||
| ### New Features | ||||||||||
|
|
||||||||||
| * Added ability to scroll forward braille automatically. (#18573, @nvdaes) | ||||||||||
|
||||||||||
| * Added ability to scroll forward braille automatically. (#18573, @nvdaes) | |
| * Added the ability to automatically scroll braille forward. (#18573, @nvdaes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think of this wording?
| * Added ability to scroll forward braille automatically. (#18573, @nvdaes) | |
| * Added the ability to automatically scroll the braille display. (#18573, @nvdaes) |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2398,6 +2398,20 @@ Enabling this option will cause NVDA to speak lines or paragraphs reached using | |||||
|
|
||||||
| To toggle this option from anywhere, please assign a custom gesture to "speakOnNavigatingByUnit" in the "Braille" section of the [Input Gestures dialog](#InputGestures). | ||||||
|
|
||||||
| ##### Automatic Scroll Rate {#BrailleAutoScrollRate} | ||||||
|
||||||
| ##### Automatic Scroll Rate {#BrailleAutoScrollRate} | |
| ##### Automatic Scroll Rate {#BrailleSettingsAutoScrollRate} |
Copilot
AI
Dec 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grammatical error: "if the line been read" should be "if the line being read" (if referring to the current reading action) or "if the line has been read" (if referring to a completed action). Based on the context, "if the line being read" seems more appropriate.
| While the automatic scroll option is enabled, you can still use the scroll back command to read previous contents again, and scroll forward, for example, to skip a blank line, or if the line been read is too short. | |
| While the automatic scroll option is enabled, you can still use the scroll back command to read previous contents again, and scroll forward, for example, to skip a blank line, or if the line being read is too short. |
Copilot
AI
Dec 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grammatical error: "cells for second" should be "cells per second" to match the terminology used elsewhere in the documentation (e.g., line 2403).
| When using commands to decrease or increase the scroll rate, instead of the slider, NVDA will report the number of cells for second, not the percentage shown in the slider. | |
| When using commands to decrease or increase the scroll rate, instead of the slider, NVDA will report the number of cells per second, not the percentage shown in the slider. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The UI message for rate changes only displays the numeric value without units or context (e.g., "10.0"). This could be confusing for users who don't know what the number represents. Consider adding a translatable message that includes the unit, such as "10.0 cells per second" to match the terminology used in the documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. We could also go with "rate {rate}" (like with speech rate)