-
-
Notifications
You must be signed in to change notification settings - Fork 731
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?
Conversation
|
Some displays have capacitive sensors that can detect when you reach the end of the line of Braille and optionally advance automatically, so supporting this use case is also worth thinking about. |
…possible interferences, especially if speak while navigating by line or paragraph is enabled
This means that the speed would be dependant on the braille display size, but that doesn't seem to be the case in your code yet. I like the assumed characters per sec approach though. That would mean you can increase scrolling speed when a line only contains a few characters. |
|
Leonard wrote:
I write the code for that approach, but later I removed it due to feedback from people who is concerned about ability to understand this concept, thinking for example in older people, or people with cognitive difficulties. Seems that the BrailleExtender add-on used the seconds approach, not chars/sec. |
|
For now I'll try to create a combo box. I thought abou using the number of used cells, not the display size, too. But perhaps this produces an uncomfortable feeling if someone doesn't know if all relevant information has been read, if interval about scrollings is variable. So a combo box is more flexible than a checkbox, to add several options if desired. |
|
@SaschaCowley , I think that the failure of Pyright is not related to the code. Seems that the analysis is not performed due to something related to the cache. |
|
Sorry @SaschaCowley , forget my comment about Pyright. I've analyzed the code locally and have fixed it (now no I don't get errors and the check here has passed). |
|
I see that this has been labelled with ConceptApproved, so I'll continue working on this. I think that adding a combo box for cells/seconds and seconds can be confusing, since in one case the value increases the rate, and in the other one the delay is increased. So I'm thinking in adding just a value, but trying to reflect the conversion between cells/seconds to seconds deppending on the display size. I have found people who doesn't understand the concept of cells/seconds, at least the first time. But I think that it has more sense that jst seconds, since the same value can be applied regardless to the display size, for example if someone connects a different braille display. |
Co-authored-by: Sean Budd <[email protected]>
|
@seanbudd , thanks for your review. I've seen just a suggestion related to the user guide, and I've applied it. |
SaschaCowley
left a comment
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.
Overall really nice, @nvdaes. A few style things, as well as some questions regarding the UX for braille-only users.
source/globalCommands.py
Outdated
| if config.conf["braille"]["autoScrollRate"] < maxRate: | ||
| config.conf["braille"]["autoScrollRate"] += 1 | ||
| rate = str(config.conf["braille"]["autoScrollRate"]) | ||
| speech.speakMessage(rate) |
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 about braille-only users?
source/globalCommands.py
Outdated
| if config.conf["braille"]["autoScrollRate"] > minRate: | ||
| config.conf["braille"]["autoScrollRate"] -= 1 | ||
| rate = str(config.conf["braille"]["autoScrollRate"]) | ||
| speech.speakMessage(rate) |
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 about braille-only users?
|
Thanks for your review, @SaschaCowley . About only braille users, when a message is shown in braille, scrolling is disabled, but I'll try to fix this. |
Co-authored-by: Sascha Cowley <[email protected]>
|
@SaschaCowley , I think that I've addressed all your comments, and I've tested this locally. |
seanbudd
left a comment
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.
@nvdaes - nice work here, I'm sure this will be a much appreciated feature.
source/braille.py
Outdated
| :param enable: ``True`` if automatic scroll should be enabled, ``False`` otherwise. | ||
| """ | ||
|
|
||
| if not self.enabled or config.conf["braille"]["mode"] == BrailleMode.SPEECH_OUTPUT.value: |
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.
I'm a bit confused by this, wouldn't braille mode speech output be a major use case for this? i.e. being able to read the braille and hear the speech at roughly the same time?
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.
Yes, may be. I don't use the speech mode, so I didn't think about this. I'll test and add it.
source/config/configSpec.py
Outdated
| # Timeout after the message will disappear from braille display | ||
| messageTimeout = integer(default=4, min=1, max=20) | ||
| # Rate for automatic scroll | ||
| autoScrollRate = integer(default=10, min=1, max=20) |
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.
is 20 different rates too limiting? perhaps the interval step should be 0.1 or 0.5?
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.
Yes, 20 seems too much. Let's use 15 cells/sec. Should we use a slider instead of a spin control?
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.
I was thinking 20 is not enough? I think a spin control is good here
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.
Generally I read at 12 cells/sec or so. According to a rule used in Spain for captions, the recommended speed is 12 chars/sec or so too. I think that 20 is a lot, but may be that in some texts can be used.
We can use 30 if you want. When lines are short, I use the keystroke in the braille display to scroll forward manually.
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.
My concern wasn't about raising it to 30, but instead allowing 10.5/sec or 10.1/sec. e.g. finer grain
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.
OK, then 20 may be enough, but I need to investigate how to allow 0.1 interval using seconds. Perhaps milliseconds wikk be better, or using a slider. I don't know another samples of float numbers with spin controls.
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.
You can use SetIncrement on a wx.SpintCtrl
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.
I think an interval of 0.5 might be enough? We can always change it 0.1 later
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.
OK. I'll try to use SetIncrement and a float value in the config. I'll work for this this weekend.
|
FYI, in #12049, I have finally had to use integers in milliseconds rather than float number due to GUI issues (with wx). |
|
Cyrille wrote:
I'm investigating several solutions, like using percentages or milliseconds, but I'm not satisfied with the user experience. |
Link to issue number:
Fixes #18573
Summary of the issue:
Users may wish to scroll braille automatically.
Description of user facing changes:
Description of developer facing changes:
The
BrailleHandlerclass has a new method namedautoScrollwith anenableparameter, to toggle braille automatic -scroll.Description of development approach:
Added an
autoScroll`` method in theBrailleHandlerclass to toggle automatic scroll. This will usewx.CallLaterto call theautoScrollForwardmethod. Code has been added to stop autoScroll when the caret reaches the end of a document (the cursor is not moved), when a message is displayed in braille, when a new object is handled, on secure screens, and when the session is locked, via the_clearAll` method.Also, if automatic scroll is enabled, when scrolling back or forward, autoScroll will be disabled and enabled to reset the timer and scroll forward again.
Testing strategy:
Tested locally.
Known issues with pull request:
None.
Code Review Checklist: