Visual Studio how to change GoToDeclaration shortcut (Ctrl+F12) - c#

In Visual Studio, C#, we have many interfaces. And you want to see a function's implementation and the only way its by pressing Ctrl+F12=GoToDeclaration.
The other shortcuts Ctrl + Left Click or F12 will go to the function's definition in the interface. Which is not so used compared to the necessity to see the actual implementation and navigate code.
I highly navigate by clicking names. I know you also do. And the only way is by pressing two keys which is extremely slow especially because when inspecting you usually only use the mouse.
I want to change GoToDeclaration shortcut from Ctrl + F12 to Mouse middle button click (scroll click) and Visual Studio settings allows me only keyboard shortcuts.

According to the comments:
A simple workaround to use middle mouse button click (scroll click) instead of Ctrl + F12 for the GoToDeclaration shortcut is to use AutoHotKey program.
~MButton:: { Send {LButton} Send ^{F12} Return }

Related

change mouse button function

i've new mouse gaming that have several additional button. this mouse doesn't include application to allow user modifying function for the button. i like to change just like sharpkeys do. If there's any application that can allow me, can you tell me what is it? Or if there's no application yet, i im interested to starting developing.
for development choice, i've 2 option, develop with electron(javascript) or c#(the same programming language used by sharpkeys). can you recommend me which one is better?
update:
from this following link
https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button
we can detect that every button has their own key code, my mouse button additional key code is 3 and 4. how can i modify these key become a same function like home/end in my computer keyboard?
You didn't state clearly about what you want to achieve.
Press a mouse button and act like "go to top of the page" ( what home key does ).
Press a mouse button and act like press home, and press home is defined by yourself.
I'll try to answer both.
According to your link, I found this
For solution 1.
You need mouse button act as "go to the top of page", you shall dig about how to "go to
the top of page".
For solution 2.
Keyboard event will tell you which key is pressed.
You may route mouse event and keyboard event to the same function.
i'm also found other application for alternatives for the solution to my problem, It's Mouse Manager. However, i'm still interested to develop application that can customize the mouse gaming button, for future development.

Map Keyboard Combination to Mouse Right Click - C#

I am creating a program which will automate some office works. Is some cases I must copy students' numbers to clipboard and paste them some where else.
I need to map "Ctrl+V" (paste) to mouse Right click while running my App So When I right click some where, instead of normal mouse right click, it do pasting.
How Can I make such thing via C#?

Visual Studio 2012/2013 Navigation Back/Forward with Mouse confliting with Mouse Plugin

The Navigate Backward (Ctrl+-) and Forward (Ctrl+SHIFT+-) buttons on the IDE use to be controlled by the mouse lateral Back/Forward buttons in VS 2010.
In VS 2012, the mouse buttons only works in some cases, like going back after clicking in "Go To Definition" in a method call. They are not attached to the IDE buttons.
Trying to fix that, I've installed this plugin: Mouse Navigation
Well, it works fine until you use the "Go To Definition", after that, the embedded VS Back/Forward mouse functionality start to conflict with the plugin, resulting in messy behavior!
Am I the only one with this problem? I've tried to Google it, but I've found nothing.
This is really annoying! I hope someone can help me to solve that.
Edit:
As you can see at the marked answer, the plugin have been fixed by its developer thanks to this topic. The last version (2.2.0) is working fine.
Some clarifying:
Visual Studio (2012) separates the normal navigation from "click to go" navigation.
Normal navigation: mouse click anywhere in code editor, tab change also.
Click to go navigation: Go to definition, search result click. It is controlled by the buttons named: "Browse Back / Next" "Previous/Next Definition, Declaration or Reference". You can find it in the View custom toolbar.
The default VS mouse back/forward buttons are attached to the "Browse Back / Next" buttons, not to the Navigate back/forward.
The VS plugin Mouse Navigation sets the mouse buttons to the Navigate back/forward. The only remaining problem is that because VS doesn't consider "click to go" as normal navigation, when you click to go to a definition and try to go back using the Ctrl+- or mouse back, you will not return to the last position, but to the previous "Normal navigation" position.
My suggestion to the plugin developer is to try to make VS consider "click to go" navigation as normal ones, completely solving this issue.
I just updated the Mouse Navigation extension to improve reliability of the commands. For some reason I never updated the extension to properly use the new IMouseProcessorProvider interface when I migrated from Visual Studio 2008 to Visual Studio 2010, and that bug never bothered me enough to revisit the extension until today.
You should find that version 2.1.0 behaves properly in Visual Studio 2010-2013.
The reason it only half works without the plug-in is because the mouse forward/back buttons do not map to navigate forward/back but rather some other navigation command (which never made sense to me as to what it was doing).
The way I solved this problem is to use my mouse software (SetPoint from Logitech in my case) to bind mouse forward/back to CTRL+SHIFT+- and CTRL+- respectively, while Visual Studio is in the foreground. This leaves my back/forward buttons working correctly in other applications (web browser) but while in Visual Studio I get the expected functionality.
Also, Visual Studio 2013 does seem to have better mouse back/forward control... though I haven't been using it long enough to be able to say whether the problem is truly fixed.

Is there a shortcut to open resharper menu?

When i type something and i want to open the little menu integrated in visual studio i press CTRL + .
Unfortunately this menu has very few options, and the things I need are in the Resharper menu (which is represented by the red lamp on left)
I want him to generate empty method..
The way I do it now is by clicking on the lamp, and then choosing the option i want (like generate method, add readonly to field, convert to lambda ... )
I can't find a way to open that menu otherwise and i'm sure that some keyboard shortcut must exist.
I know that the question seems dumb, but it will save me lots of time in the long run :)
Thank and have a good day.
The Shortcut for Quick Fix is Alt + Enter, which is the same than add reference with the Visual Studio scheme.
You can change it in Tools->Options->Environment->Keyboard, look for the command named ReSharper_QuickFix (I also heard it was renamed to ReSharper_AltEnter in some versions).
You want the Action List. To access it hit..
Alt + Enter
Here is the full list of R# commands
Here is more info on the Action List.
The below extension is for VS2012 will helps you to see the available shortcuts. Sometimes this will suites for your needs
http://visualstudiogallery.msdn.microsoft.com/f2964c90-68e2-4ddd-861a-bd66e5cd4434

Is there any way of create or altering VS Keyboard shortcuts

I have recently installed Reshaper....this is very good and helpful however it has changed all my keyboard shortcuts e.g. to comment out code it was Ctrl + E then C, now it is Ctrl + K then C ... this is a pain given that I have got myself into a natural swing of using all the shortcuts and now I have to think everytime I want to use them...
A solution is obviously to shut up and use the new shortcuts ... I agree, but its unnecessary to change the way I work if a alteration solution is possible - so therefore its necessary to not change.
You can tell Resharper to use the VS shortcuts instead. At least for those you already know, they will stay the same
#Mike mentions the Tools, Customize, Keyboard button. There's a 'Reset' button in there that will take you to a pre-Resharper state.
If you later want to go back to the Resharper shortcuts, you can use a button in Resharper's own Options dialog to apply them.
Select ReSharper menu -> Options -> Visual Studio Integration: Select None and Apply Scheme. However, I highly recommend you pick one of the two keyboard layouts and learn it. Also, unplug the mouse a couple of hours a day. It helps improve efficiency.
It should be possible. Check out this MSDN article on how to alter keyboard shortcuts in Visual Studio.
Yes, just go to Tools->Customize and click the "Keyboard" button in the bottom left.
During installation of ReSharper you can set whether it uses its own shortcut keys or Visual Studio. Moreover, there is an option in ReSharper to associate/dis-associate the keyboard shortcuts after installation.

Categories