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 a way to bind a keyboard shortcut with manual profile activation/deactivation #4209

Closed
nvaccessAuto opened this issue Jun 20, 2014 · 13 comments · Fixed by #8844
Closed
Assignees
Labels
enhancement feature/configuration-profiles p4 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority
Milestone

Comments

@nvaccessAuto
Copy link

Reported by kredh on 2014-06-20 09:53
It would be great to be able to manually activate/deactivate configuration profiles (those who are configured for manual activation) with a keystroke that could be entered by the user. This feature could be added to the configuration profile dialog box (perhaps a button only accessible for profiles configured for manual activation).

If the profile is not activate, the keystroke activate it. Otherwise it deactivate it. It remains pretty simple and would allow more speed while switching between manual profiles.

@nvaccessAuto
Copy link
Author

Comment 1 by briang1 on 2014-06-21 10:32
While admitting this might be faster, have you considered the ramifications?
The number of key combinations used already is quite large, and nobody can know how many manual profiles a user might create, so any series of hotkeys for this has to be open ended, so to speak.

You would need to have a way to allow the manual profile user add their key combination, then check it against already in use ones and reject you back if it was already taken. Of course this also might need to take into account the other set, and any custom ones already used or changed.

@nvaccessAuto
Copy link
Author

Comment 2 by kredh on 2014-06-21 10:39
That's true, but isn't that the case already? The user can add as many addons as he wants, but in the hand, he remains responsible (as far as I know) for the shortcuts used by different addons and the potential conflicts between them.

Another possibility would be to save a range of shortcuts but I don't like the idea: it disables to many shortcuts that may be not used by the user, and if a user likes the idea enough the range may be too small for him. No, I really think trusting the user would remain the simplest solution.

@nvaccessAuto
Copy link
Author

Comment 3 by briang1 on 2014-06-23 05:47
Well, profiles are a core function, not an add on, but I was just pointing out the issues this will raise.

The point is, you would o presumably be going to ally the manual profile to some screen or application, and maybe this is where a choice could be built in. a kind of soft binding that acts like a trigger, but does not do it until you press the key.

@nvaccessAuto
Copy link
Author

Comment 4 by mohammed on 2015-05-02 16:47
agreed. such a feature is going to be very much welcome. at least the ability to switch between 2 manual profiles.

and while we're at it, what if the ring was expanded to switch between profiles?

@jcsteh
Copy link
Contributor

jcsteh commented Apr 12, 2017

P3 because this would be a massive efficiency boost for some use cases; e.g. #6882.

@jcsteh jcsteh added the p4 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority label Apr 12, 2017
@LeonarddeR
Copy link
Collaborator

For reference, here is an alternative approach I came up with in #7058:

Add an extra option to each profile which adds the profile to a list which can be cycled through using an input gesture (NVDA+shift+p) by default

Personally, I prefer the first approach though. @jcsteh: How would you like this to be implemented?

@mikolysz
Copy link
Contributor

mikolysz commented Jul 7, 2018

What's the current status of this issue? Is anyone working on it?

@LeonarddeR LeonarddeR self-assigned this Oct 10, 2018
@LeonarddeR
Copy link
Collaborator

I'll take this one as soon as I have some time for it.

@feerrenrut, @michaelDCurran, @Qchristensen: do you agree with the approach where every profile gets a magic script which is unbound by default? There are still two possibilities there:

  1. When binding nvda+i to the misc profile, pressing it will activate it. pressing it again will deactivate it.
  2. When binding nvda+i to the misc profile, pressing it will activate it. You can only deactivate it by pressing a gesture that is associated with the normal configuration profile.

I prefer the first option, as its UX more closely matches the gui where you activate and deactivate profiles, i.e. you can't activate the normal configuration.

@Qchristensen
Copy link
Member

Of those two options, I agree the first one is arguably more useful and easier to understand. My question is where did NVDA+i come from? My immediate thought is that I can't relate why the letter "i" for profiles, except that it is one of not many NVDA+letter assignments that are free.

My other thought was that you could use something like NVDA+control+number, and that way you could assign shortcuts to ten profiles. I'm sure as soon as I say "no-one will need more than that" someone will throw out a use case, but it does give a sequence of options which the user can set as they prefer. I would suggest NVDA+control+1 activates the chosen profile then the same keystroke again to deactivate it, or if you press say NVDA+control+2 it would activate that profile.

I realised after I'd written this that NVDA+control+numbers are used by both Skype and Miranda, so maybe NVDA+shift+number?

Or as someone suggested earlier, NVDA+shift+p and either have it a toggle for one profile, or a cycle through any number as elected by the user?

@LeonarddeR
Copy link
Collaborator

My question is where did NVDA+i come from?

Honestly, it is completely random.

My other thought was that you could use something like NVDA+control+number, and that way you could assign shortcuts to ten profiles. I'm sure as soon as I say "no-one will need more than that" someone will throw out a use case, but it does give a sequence of options which the user can set as they prefer. I would suggest NVDA+control+1 activates the chosen profile then the same keystroke again to deactivate it, or if you press say NVDA+control+2 it would activate that profile.

Personally, I'd prefer having the author choose this. Like:

  1. IN the input gestures dialog, have a separate category "configuration profile activation"
  2. For every profile, dynamically add an entry to the list for the profile, leaving it unbound by default.
  3. Optionally have people assign a gesture right from the configuration profiles dialog, without requiring them to open the input gestures dialog.

@nvaccessAuto nvaccessAuto added this to the 2019.2 milestone May 10, 2019
feerrenrut pushed a commit that referenced this issue May 10, 2019
Closes #4209 

Previously configuration profiles could only be activated:
- automatically with triggers
- by manual activation in the dialog for configuration profiles

This commit adds support for activation with gestures.

1. When NVDA is started, a script is added to the class for every profile.
2. Adding a profile also adds a script
3. Removing a profile deletes it's script along with gestures that have ever been bound to it.
4. Renaming a profile removes the old script, and then adds a new one. The assigned gestures are moved from the old to the new script.

Config profiles are bound to file naming restrictions, whereas script names are bound to python variable naming rules. The latter rules are stricter. This is now taken care of by changing any thing that is not either an alphanumeric or an underscore to its base16 encoding. Doing so meets the naming requirements and avoids a name collision when having a "Test profile" and "Test_profile" profile.
@kara-louise
Copy link

I love this feature, but, I think currently the switching message is a bit verbose. I suggest rather than saying "Configuration profile Web manually activated" for example, say "web manually activated". Or just "web activated".

@feerrenrut
Copy link
Contributor

the switching message is a bit verbose.

I think it could easily be confusing to someone who is not very familiar with what is going on. Though I agree that the name of the configuration profile should come first, an experienced user can then silence their synth. What about {name} profile activated and {name} profile deactivated

@kara-louise
Copy link

What about {name} profile activated and {name} profile deactivated

Yes, That'd work.

Apologies if This appears twice as reply via e-mail doesn't seem to be working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feature/configuration-profiles p4 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants