Skip to content
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

Add new commands for synth ring #16095

Merged
merged 27 commits into from
Feb 11, 2024
Merged

Conversation

rmcpantoja
Copy link
Contributor

@rmcpantoja rmcpantoja commented Jan 25, 2024

Link to issue number:

Fixes #13768
It's very related to this issue, since it adds these same suggested commands in it for easier navigation in certain cases.

Summary of the issue:

More efficient navigation in the synth settings ring by adding new commands for it.

Description of user facing changes

Added scripts:

  • Set the current value to the first one as unassigned gesture.
  • CTRL+shift+NVDA+page up (laptop) and CTRL+NVDA+page up (desktop) to jump forward the current value by 4x.
  • CTRL+shift+NVDA+page down (laptop) and CTRL+NVDA+page down (desktop) to jump backward the current value by 4x.
  • Set the current value to the last one as unassigned gesture.

Description of development approach

In the synth ring, the first and last functions, as increase or decrease by 4x defs as well, (which handles self.min and self.max) were added to both the numeric ring and the global ring, in their respective classes. I consider this approach to be better, because by jumping in this way, focusing on the minimum and maximum values, it can respect the settings of other synth drivers and thus not cause problems with them.

Testing strategy:

  1. Set the synth ring to a specific setting. EX: speed.
  2. press control+shift+NVDA+page up or page down (laptop) or control+NVDA+page up or page down (desktop) to jump forward or backward through the currently selected setting. It should increase the value from 20 by 20. Also, assigning a gesture to jump to the first and last value, for example in the rate option, it should set the rate to 100 or 0.

Known issues with pull request:

None

Code Review Checklist:

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

@AppVeyorBot
Copy link

See test results for failed build of commit 59ea297e82

@AppVeyorBot
Copy link

See test results for failed build of commit 582669b4d5

@rmcpantoja rmcpantoja changed the title Add new comands for synth ryng Add new commands for synth ring Jan 25, 2024
@rmcpantoja rmcpantoja marked this pull request as ready for review January 26, 2024 03:59
@rmcpantoja rmcpantoja requested review from a team as code owners January 26, 2024 03:59
@cary-rowen
Copy link
Contributor

Are these gestures really necessary?

In the original feature request @TheQuinbox wrote:

It isn't necessarily a problem, but would definitely make work more efficient.

Can there be an example or two of this?

Some of my concerns:
If the user accidentally adjusts the volume to the maximum value, it may cause hearing discomfort.

If the user accidentally sets the speech rate to the maximum value, it may be difficult to restore without knowing these gestures.

We can hardly assume that the user knows nvda+ctrl+r.

There are no such worries in the voice settings dialog, because it is real-time interaction and contextual.

@AppVeyorBot
Copy link

See test results for failed build of commit 8a570b62bf

@rmcpantoja
Copy link
Contributor Author

rmcpantoja commented Jan 26, 2024

Are these gestures really necessary?

In the original feature request @TheQuinbox wrote:

It isn't necessarily a problem, but would definitely make work more efficient.

Can there be an example or two of this?

Some of my concerns: If the user accidentally adjusts the volume to the maximum value, it may cause hearing discomfort.

If the user accidentally sets the speech rate to the maximum value, it may be difficult to restore without knowing these gestures.

We can hardly assume that the user knows nvda+ctrl+r.

There are no such worries in the voice settings dialog, because it is real-time interaction and contextual.

Hi,
Well, finally the purpose of this PR is the same as the linked issue, to make efficient browsing into synth ring.
As for your concerns, that's a good point. In mi opinion, the user might already have prior knowledge about these keyboard shortcuts. But if we're talking about something that happens accidentally (such as the similar command to know the status bar in terms of keystrokes), I think leaving the start/end gestures unassigned would be ideal. This being so, the user could be responsible for using that shortcut and avoiding the accident, but I would like to hear more opinions.

@CyrilleB79
Copy link
Collaborator

IMO, these gestures are not very useful because no one use the min and max values of almost all parameters.

What would be much more useful would be to have long step commands, e.g. move 20 by 20, or determine the step according to the number of available values. Would be much more useful for numeric parameters, but also for long lists such as eSpeak Voices (languages).

Also, gestures allowing to keep the hand on the arrow pad would be better than the use of home/end. What about NVDA+control+windows+up/downArrow (desktop keyboard) and NVDA+shift+control+windows+up/downArrow (laptop)? These gestures may seem a bit complex but they can be reassigned for people having difficulties using gestures with many modifiers.

@rmcpantoja
Copy link
Contributor Author

IMO, these gestures are not very useful because no one use the min and max values of almost all parameters.

What would be much more useful would be to have long step commands, e.g. move 20 by 20, or determine the step according to the number of available values. Would be much more useful for numeric parameters, but also for long lists such as eSpeak Voices (languages).

Also, gestures allowing to keep the hand on the arrow pad would be better than the use of home/end. What about NVDA+control+windows+up/downArrow (desktop keyboard) and NVDA+shift+control+windows+up/downArrow (laptop)? These gestures may seem a bit complex but they can be reassigned for people having difficulties using gestures with many modifiers.

Hi @CyrilleB79
Yeah I know that setting the first and last value may not be very popular and useful, but there will be people like me who find a use for it, E.G. quickly go to the first available voice; quickly set the speed to 0 (with rate boost on) useful for maintaining a natural reading profile when interpreting text, although it depends a lot on the synthesizer used and how this synthesizer uses the rate command, and although this may be possible with configuration profiles, some people do not handle them.
On the other hand, long step commands (20*20, 4x increment/decrement) are already implemented in this pull request, which uses these keyboard accompaniments, but page down and page up instead.
The suggested commands sound good! Thank you for pointing out this.

@CyrilleB79
Copy link
Collaborator

Sorry, I had read the description too quickly.

I think that the commands to jump to first or last value should not be assigned any gesture because I think that only few people will use them.

Regarding the long jump, a step of 4x is nice for values which vary between 0 and 100. For long lists such as eSpeak voices, 4x = 4 items in a list of many items is a too short step: there are 133 voices for eSpeak and 105 variants. In this case, long steps should allow to go through the whole list pressing 5 to 8 times the long step gesture.

@rmcpantoja
Copy link
Contributor Author

Sorry, I had read the description too quickly.

I think that the commands to jump to first or last value should not be assigned any gesture because I think that only few people will use them.

Regarding the long jump, a step of 4x is nice for values which vary between 0 and 100. For long lists such as eSpeak voices, 4x = 4 items in a list of many items is a too short step: there are 133 voices for eSpeak and 105 variants. In this case, long steps should allow to go through the whole list pressing 5 to 8 times the long step gesture.

Thanks again, good suggestion! In fact, I think it is the right thing to do to prevent certain incidents from occurring with a beginner user.
Jumping forward and backward: Now that I think about it, setting.largeStep hasn't been used much in NVDA that I know of, so I can take advantage to use it for these two scripts, just multiplied by two so it's still 4x magnification. The difference is that in the lists (voice, variant, etc) it should also make long jumps like the same behavior in the slider settings. I will apply these improvements soon! 👍🏻

@AppVeyorBot
Copy link

See test results for failed build of commit ed195b118d

@AppVeyorBot
Copy link

See test results for failed build of commit b71f7b64b2

@rmcpantoja
Copy link
Contributor Author

Hi,
I applied these suggestions according to your touts and points. Lint is also fixed.

The latest failure in system tests appears to be independent of these new features.

@seanbudd seanbudd added the conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review. label Jan 29, 2024
@rmcpantoja rmcpantoja marked this pull request as ready for review February 1, 2024 13:25
@rmcpantoja
Copy link
Contributor Author

Hi,
I think that this PR is ready for the purpose it serves, unless there are more suggestions.

source/globalCommands.py Outdated Show resolved Hide resolved
source/synthSettingsRing.py Outdated Show resolved Hide resolved
user_docs/en/changes.t2t Outdated Show resolved Hide resolved
user_docs/en/userGuide.t2t Outdated Show resolved Hide resolved
user_docs/en/userGuide.t2t Outdated Show resolved Hide resolved
user_docs/en/userGuide.t2t Outdated Show resolved Hide resolved
user_docs/en/userGuide.t2t Outdated Show resolved Hide resolved
user_docs/en/userGuide.t2t Outdated Show resolved Hide resolved
@seanbudd seanbudd marked this pull request as draft February 2, 2024 05:45
@AppVeyorBot
Copy link

See test results for failed build of commit c2459a0849

@AppVeyorBot
Copy link

See test results for failed build of commit d49a6f5450

@rmcpantoja rmcpantoja marked this pull request as ready for review February 8, 2024 12:12
@rmcpantoja
Copy link
Contributor Author

Hi,
This feature is ready again.

Copy link
Member

@seanbudd seanbudd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is almost ready

source/synthSettingsRing.py Outdated Show resolved Hide resolved
source/synthSettingsRing.py Outdated Show resolved Hide resolved
source/synthSettingsRing.py Outdated Show resolved Hide resolved
@seanbudd seanbudd marked this pull request as draft February 9, 2024 00:00
rmcpantoja and others added 2 commits February 8, 2024 19:57
Improved type hints.

Co-authored-by: Sean Budd <seanbudd123@gmail.com>
@@ -4,7 +4,6 @@
import queueHandler
from autoSettingsUtils.driverSetting import BooleanDriverSetting, NumericDriverSetting


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please restore this new line? otherwise this is ready to go

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done👍🏻

@rmcpantoja rmcpantoja marked this pull request as ready for review February 11, 2024 20:18
Copy link
Member

@Qchristensen Qchristensen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

User guide reads fine.

@seanbudd seanbudd merged commit b03f7cb into nvaccess:master Feb 11, 2024
1 check passed
@nvaccessAuto nvaccessAuto added this to the 2024.2 milestone Feb 11, 2024
@cary-rowen
Copy link
Contributor

cary-rowen commented Feb 12, 2024

Congratulations on this PR being merged, please update the description of the original PR to be consistent with the actual changes. This helps translators or people interested in this PR review it in the future.

  • CTRL+shift+NVDA+home (laptop) and CTRL+NVDA+home (desktop) to set the current value to the first one.
  • CTRL+shift+NVDA+end (laptop) and CTRL+NVDA+end (desktop) to set the current value to the last one.

These two commands are not actually assigned, but the functionality is there.

@rmcpantoja
Copy link
Contributor Author

Congratulations on this PR being merged, please update the description of the original PR to be consistent with the actual changes. This helps translators or people interested in this PR review it in the future.

  • CTRL+shift+NVDA+home (laptop) and CTRL+NVDA+home (desktop) to set the current value to the first one.
  • CTRL+shift+NVDA+end (laptop) and CTRL+NVDA+end (desktop) to set the current value to the last one.

These two commands are not actually assigned, but the functionality is there.

Hi @cary-rowen,
Thank you to pointing out this.
I updated the PR description according to these last advances.

Nael-Sayegh pushed a commit to Nael-Sayegh/nvda that referenced this pull request Feb 15, 2024
Fixes nvaccess#13768
It's very related to this issue, since it adds these same suggested commands in it for easier navigation in certain cases.

Summary of the issue:
More efficient navigation in the synth settings ring by adding new commands for it.

Description of user facing changes
Added scripts:

CTRL+shift+NVDA+home (laptop) and CTRL+NVDA+home (desktop) to set the current value to the first one.
CTRL+shift+NVDA+page up (laptop) and CTRL+NVDA+page up (desktop) to jump forward the current value by 4x.
CTRL+shift+NVDA+page down (laptop) and CTRL+NVDA+page down (desktop) to jump backward the current value by 4x.
CTRL+shift+NVDA+end (laptop) and CTRL+NVDA+end (desktop) to set the current value to the last one.
Description of development approach
In the synth ring, the first and last functions, as increase or decrease by 4x defs as well, (which handles self.min and self.max) were added to both the numeric ring and the global ring, in their respective classes. I consider this approach to be better, because by jumping in this way, focusing on the minimum and maximum values, it can respect the settings of other synth drivers and thus not cause problems with them.
Adriani90 pushed a commit to Adriani90/nvda that referenced this pull request Mar 13, 2024
Fixes nvaccess#13768
It's very related to this issue, since it adds these same suggested commands in it for easier navigation in certain cases.

Summary of the issue:
More efficient navigation in the synth settings ring by adding new commands for it.

Description of user facing changes
Added scripts:

CTRL+shift+NVDA+home (laptop) and CTRL+NVDA+home (desktop) to set the current value to the first one.
CTRL+shift+NVDA+page up (laptop) and CTRL+NVDA+page up (desktop) to jump forward the current value by 4x.
CTRL+shift+NVDA+page down (laptop) and CTRL+NVDA+page down (desktop) to jump backward the current value by 4x.
CTRL+shift+NVDA+end (laptop) and CTRL+NVDA+end (desktop) to set the current value to the last one.
Description of development approach
In the synth ring, the first and last functions, as increase or decrease by 4x defs as well, (which handles self.min and self.max) were added to both the numeric ring and the global ring, in their respective classes. I consider this approach to be better, because by jumping in this way, focusing on the minimum and maximum values, it can respect the settings of other synth drivers and thus not cause problems with them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add more settings ring commands.
7 participants