13

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.

Pedro77
  • 5,176
  • 7
  • 61
  • 91
  • 4
    It seems that by default Back/Forward buttons of the mouse (XButton1 and XButton2) are invoking View.ForwardBrowseContext and View.PopBrowseContext commands (which, by the way, are bound to Ctrl+Shift+7 and Ctrl+Shift+8). Unfortunately I cannot find a way to re-map them. – Borislav Ivanov Oct 20 '13 at 20:53
  • Is there a way to disabled the mouse mapping (if not add a new one) to those things? – Micah Zoltu Oct 21 '13 at 17:08
  • Well, I don't know any. – Pedro77 Oct 23 '13 at 00:18

2 Answers2

10

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.

Sam Harwell
  • 97,721
  • 20
  • 209
  • 280
  • 1
    Oh! You are the developer of the extension! Ive posted this issue at the extension website, but no answer. I'm glad you updated it. It was too much suffering and misery! lol. Thanks! I'm going to test it. – Pedro77 Oct 25 '13 at 12:35
  • 1
    unfortunately, it still not working properly. After using Go to definition or clicking in a search result, it start to "double navigate", going like back and forward in a single click. Please fix it! :( – Pedro77 Oct 25 '13 at 12:46
  • @Pedro77 Thank you for the update, I was able to reproduce the problem by clicking in search results. I'll try to fix it ASAP! – Sam Harwell Oct 25 '13 at 21:50
  • 1
    @Pedro77 I just released version 2.2.0. Can you try it and let me know if the problems you experienced are now resolved? Thanks! – Sam Harwell Oct 26 '13 at 02:25
  • 1
    Yes, now it is working fine as the Navigation button Ctrl+- and Ctrl+Shift- clicks! The search results clicks does not add positions to this Navigations buttons, but, to the "Previous Definition, Declaration or Reference" button. Can you add this to your plugin as Navigation changes? I don't know why, but VS separates this "clicks to go" navigations from "normal" ones. – Pedro77 Oct 28 '13 at 12:21
9

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.

RJFalconer
  • 10,890
  • 5
  • 51
  • 66
Micah Zoltu
  • 6,764
  • 5
  • 44
  • 72
  • Ok, this is a workaround, but I was expecting some VS plugin or solution without 3rd part software; Similar answer at: http://stackoverflow.com/questions/10686901/how-do-i-edit-visual-studios-mouse-shortcuts – Pedro77 Oct 21 '13 at 12:22
  • 1
    I agree, it is a hacky solution and I am not a fan of it. I really wish VS would just add mouse button binding support to their UI, it would solve this problem. :/ – Micah Zoltu Oct 21 '13 at 17:09
  • The odd thing is that the Go to definition or search results clicks doesn't add a new position to navigate. I think VS tries to separate the Go TO clicks from the simple text navigation... But well, FAIL. – Pedro77 Oct 21 '13 at 20:38
  • Man, you're genius. I've the same setpoint, but this though never visited my mind. Can you describe how did you entered `CTRL + `command in setpoint? I get `CTRL + =` instead of what I need, or `CTRL + NUM +` – Johnny_D Mar 26 '14 at 08:45
  • 1
    I have mine set to "SHIFT+CTRL+-" and "CTRL+-" in Set Point. – Micah Zoltu Mar 26 '14 at 15:36