'Horizontal scroll with mouse wheel at Visual Studio
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.
Solution 1:[1]
EDIT as ShiftScroll seems to have been abandoned, I created a small extension that adds this capability to Visual Studio 2017, 2019 and 2022.
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.
Solution 2:[2]
Try out my solution with AutoHotKey:
https://superuser.com/a/1144201/240650
; Shift + Wheel for horizontal scrolling
+WheelUp::
; Scroll to the left
MouseGetPos,,,id, fcontrol,1
Loop 8 ; <-- Increase for faster scrolling
SendMessage, 0x114, 0, 0, %fcontrol%, ahk_id %id% ; 0x114 is WM_HSCROLL and the 0 after it is SB_LINERIGHT.
return
+WheelDown::
;Scroll to the right
MouseGetPos,,,id, fcontrol,1
Loop 8 ; <-- Increase for faster scrolling
SendMessage, 0x114, 1, 0, %fcontrol%, ahk_id %id% ; 0x114 is WM_HSCROLL and the 1 after it is SB_LINELEFT.
return
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Hugh W |
| Solution 2 | Community |
