Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Horizontal scroll with mouse wheel at Visual Studio

Tags:

I have a new mouse that has the ability to scroll right and left using its scroll wheel. While this feature works on web pages, Photoshop and etc., it wouldn't do anything when I use it in the Visual Studio when looking at code that is longer (horizontally) than the window.

Is there a way to make it work?

Visual Studio is 2010 Express; the mouse is Logitech MX1100.

like image 207
IgalSt Avatar asked Sep 27 '10 08:09

IgalSt


People also ask

How can I scroll horizontally with my regular mouse?

If you wish to make your mouse scroll horizontally Press SHIFT and then use the Middle mouse scroll wheel. This works if the page is large enough to be scrolled horizontally. You could see a scroll bar at the bottom. You could also press the middle mouse button once.

How do I enable scrolling in Visual Studio?

Open the Scroll Bars options page by choosing Tools > Options > Text Editor > All Languages > Scroll Bars.


2 Answers

EDIT as ShiftScroll seems to have been abandoned, I created a small extension that adds this capability to Visual Studio 2017 and Visual Studio 2019.

https://marketplace.visualstudio.com/items?itemName=drewnoakes.SideScroller

https://github.com/drewnoakes/vs-side-scroller

It enables scrolling in the text editor and several other panels such as the output window. Hopefully it helps someone out.


For VS2015 the ShiftScroll extension does this perfectly.

https://marketplace.visualstudio.com/items?itemName=NGPearce.ShiftScroll

It scrolls left/right at a very comfortable speed while you hold the shift key.

This would be a good built-in feature of VS IMHO.

like image 168
Drew Noakes Avatar answered Sep 17 '22 12:09

Drew Noakes


There are a few issues with horizontal scrolling in VS2010, some of which have been fixed or worked around after VS2010 shipped. I'm not sure if the MX1100 is a specific example of any of the following, but some of the issues were/are:

  1. Some mice drivers end up sending the event to the wrong HWND; we've seen cases where events will always be sent to the last-but-one thing focused, e.g. the solution explorer will scroll when the editor has focus. I think this one was fixed.
  2. Many drivers, before sending WM_MOUSEHWHEEL (or faking WM_HSCROLL) check to see if the main HWND has WS_HSCROLL (declares it has a win32 horizontal scrollbar). Since VS's main window doesn't, and things like the editor don't have win32 horizontal scrollbars, they'll refuse to send horizontal scroll messages. This one is unfixed.
  3. (Definitely not your case, but) VMWare Fusion (on OS X) running windows doesn't forward on horizontal scroll events to the client OS.

I'll check with people to see if the MX1100 is known or falls into either of the first two categories.

like image 36
Noah Richards Avatar answered Sep 17 '22 12:09

Noah Richards