Follow-up from #6100.
The Explorer context menu is notoriously cluttered. We shouldn't add to that clutter if we can avoid it. This issue represents me taking the time to investigate how exactly to make the menu only appear on shift+right click, not _just_ right click.
~Alright so we took a quick peek through the code and we're not sure exactly how to do this. Fortunately, PowerToys does seem to do something similar:~
~Looks like they implement another interface, IContextMenu
. If someone in the community was passionate about decluttering the context menu, we'd definitely appreciate a similar PR 😄~
EDIT: As mentioned in an offline thread:
You should stick to the IExplorerCommand implementation and avoid IContextMenu if possible.
and also mentioned here:
If you return
ECS_HIDDEN
as a function of the keyboard state (if(GetKeyState(VK_SHIFT) < 0)
orGetAsyncKeyState()
, read the docs on both, I'm not sure which is the right one to use in this case) this can be hidden conditionally. This depends on the shell calling your handler coincident with presenting the UI. I think that is always true but might not always be. Pay attention to this issue and lets discuss with the File Explorer owners.
Yeah, it's ugly long name. I am trying to disable that context menu. But I can't find Windows Terminal Preview context menu item using Nirsoft tools, like ShellExView and ShellMenuView.
Please make this configurable, Terminal is a core application in my work and should not be a secondary function.
Most helpful comment
Please make this configurable, Terminal is a core application in my work and should not be a secondary function.