end2endzone / ShellAnything

ShellAnything is a C++ open-source software which allow one to easily customize and add new options to *Windows Explorer* context menu. Define specific actions when a user right-click on a file or a directory.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I restrict the context menu to appear only when the Shift key is held down?

Glavor opened this issue · comments

Is your feature request related to a problem? Please describe.
I'd like infrequently used menus to show up exclusively when I right-click while holding down the Shift key.

Describe the solution you'd like
Right-click while holding down the Shift key to display expanded menus.

Describe alternatives you've considered
N/A

Additional context
N/A

Hi. Thank you for showing interest in ShellAnything. I forgot to create an issue to implement this feature a few releases ago and never took time to do so. Shame on me, for procrastinating this kind of feature which is already available with multiple other software that extends the shell.

Unfortunately, there is no way at the moment to do something like that. If you are kind of in a hurray, there would be a workaround. With the latest release, you could implement such a feature by developing you own plugin. However, such a feature would preferably be native to the application. I will add this issue for the next release milestone.

I would like to take the opportunity to get more feedback from you.
How would you have expected to use such a feature ?
Here is a quick tough...

  1. With a keyboard attribute in the Visibility / Validity elements ?
    For example:
<menu name="This menu is only visible with keyboard ALT and SHIFT keys are pressed">
  <visibility keyboard="alt;shift" />
</menu>
  1. With keyboard specific Properties ? I could define a new series of properties that matches the keyboard keys states.
    For example:
<menu name="This menu is only visible with keyboard ALT and SHIFT keys are pressed">
  <visibility properties="keyboard.alt;keyboard.shift" />
</menu>

I think the second option is less intuitive but it would allow more versatility.
I could even end up implementing both options.

Thank you for your response.

I lean towards the first option, utilizing a keyboard attribute within the Visibility/Validity elements. It's succinct, intuitive, and I believe it suffices to cover the requirements in most cases. I also agree with your point that the second option could offer more functionality.

If you don't mind me butting in as well, would it be possible to allow SA to pop up a menu inside of something that wasn't Explorer-based?
For example, use the hotkey and click in inside of any application to access some of the menus, ones that weren't dependent on files/directories of course, but say you could highlight text in your browser, bring up the menu (w/hotkey) and use that text or image as input for other custom commands, like I send things to llama.cpp as a prompt. Or even just to have access to things that are on your menu, allowing it to become a bit of a app launcher tool in general.

If you don't mind me butting in as well, would it be possible to allow SA to pop up a menu inside of something that wasn't Explorer-based?

@Aptronymist, such a feature should be discussed in another issue/thread. Please keep it simple with 1 request/feature per issue.

This issue is for specifically implementing keyboard validation.

would it be possible to allow SA to pop up a menu inside of something that wasn't Explorer-based?

@Aptronymist I am sorry but this is not possible with Shell Anything. Shell Anything does not "hack its way" into File Explorer. It is actually the opposite. Shell Anything is a plugin for File Explorer called a Shell Extension. In other words, File Explorer is already designed to allow other software to add dynamic menus.

There is no such plan for Shell Anything to be compatible with other software. That would require deep knowledge of each software and a compatible API / programming language. That would be out of scope for this project.

@Glavor The feature should be completed in 81cb438. I did not had much time for deep testing but the unit tests says everything should work.

You can get an unofficial 0.9.0 installer from the latest build at https://ci.appveyor.com/project/end2endzone/shellanything/builds/48996052/artifacts or https://github.com/end2endzone/ShellAnything/actions/runs/7595509806/artifacts/1183114765.

Documentation for the feature is in the User Manual, keyboard attribute and live properties section.

If you have time, please check if the feature is working as you expect. Feedback would be much appreciated. I will leave the issue opened for 1-2 weeks.

@end2endzone Thank you for your work. I have conducted a test, and everything is functioning as expected.