Horizontal scrolling in Visual Studio 2010

hotkeysscroll-wheelscrollingvisual studio 2010

Does anyone know if there is a hot key I can press to activate horizontal scrolling with my mouse wheel in Visual Studio 2010?

e.g. Pressing 'ctrl' while scrolling the mouse wheel would scroll the window to the left/right instead of up/down.

I believe Photoshop has this feature, though I can't remember the exact key of the top of my head. I think it's either 'ctrl' or 'alt'.

Edit: Middle-click does not do it for me, I'm looking for a hot-key.

Best Answer

Install Autohotkey and this script:

^+WheelUp::  ; Scroll left.  
ControlGetFocus, fcontrol, A  
Loop 20  ; <-- Increase this value to scroll faster.  
    SendMessage, 0x114, 0, 0, %fcontrol%, A  ; 0x114 is WM_HSCROLL and the 0 after it is SB_LINELEFT.  
return  

^+WheelDown::  ; Scroll right.
ControlGetFocus, fcontrol, A  
Loop 20  ; <-- Increase this value to scroll faster.  
    SendMessage, 0x114, 1, 0, %fcontrol%, A  ; 0x114 is WM_HSCROLL and the 1 after it is SB_LINERIGHT.  
return
Related Question