codecadwallader / codemaid

CodeMaid is an open source Visual Studio extension to cleanup and simplify our C#, C++, F#, VB, PHP, PowerShell, JSON, XAML, XML, ASP, HTML, CSS, LESS, SCSS, JavaScript and TypeScript coding.
http://www.codemaid.net
GNU Lesser General Public License v3.0
1.91k stars 359 forks source link

Allow changing shortcut to CodeMaid Spade #705

Open ypapouin opened 4 years ago

ypapouin commented 4 years ago

Environment

When CodeMaide Spade view is visible, there is a search box with the hint: "Search CodeMaid Spade (CTRL+M, ;)". After looking for this command in Visual Studio Keyboard Shortcuts, I'm unable to find it.

I would like to be able to remap this command to another shortcut (CTRL+G). It would be nice to also create the "CodeMaid Spade" view if not visible when pressing the shortcut (the current behavior with actual shortcut "CTRL+M, ;" is to do nothing).

codecadwallader commented 4 years ago

Thanks for reaching out. Yes you should be able to remap the keyboard shortcuts directly inside Visual Studio's keyboard shortcuts menu. Here's a screenshot in case it helps with finding it:

image

Also it should create the tool window if it does not exist when using the shortcut, the same as if you click the menu item (Extensions->CodeMaid->Spade). Out of curiosity does the menu item work for you? They both invoke the same command so I wouldn't expect different behavior.

ypapouin commented 4 years ago

Thank you for your answer but I was talking about this field where the shortcut is displayed as hint:

codemaid

codecadwallader commented 4 years ago

Ahh, sorry I misread it originally. I don't think that is currently available with the way it is setup as a key binding only. It does look like the native solution explorer search allows for customization, so perhaps there is a way.

codecadwallader commented 4 years ago

I found this article indicating it may not be possible to customize the shortcut for the solution explorer search bar: https://developercommunity.visualstudio.com/content/problem/845774/solution-explorer-search-box-keyboard-shortcut-hin.html

I'm also curious if the fact that CodeMaid is dynamically/conditionally loaded would limit the ability for the command to also create the Spade tool window.