Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In Os X, I can hold Shift while using the scroll wheel on the mouse to scroll horizontally instead of vertically. Is there a way to do something similar in Windows?

share|improve this question
    
scrolling in what application? explorer? a web browser? It's dependent on how the creator wanted to implement it so if it's a browser it will be different. –  John T Jul 27 '09 at 16:31
    
I don't think there's a system-wide shortcut for that on windows by default. –  chills42 Jul 27 '09 at 16:32
7  
I was hoping for a system-wide solution. –  Matthew Shanley Jul 27 '09 at 17:15

6 Answers 6

up vote 12 down vote accepted

You could simulate it with AutoHotKey

If I find the script I'll let you know: From these posts:

You should find some scripts

#Persistent mhook := > DllCall("SetWindowsHookEx", "int", 14 > ; WH_MOUSE_LL , "uint", RegisterCallback("WheelHorzHook"), > "uint", 0, "uint", 0) return

WheelLeft: MsgBox WheelLeft return

WheelRight: MsgBox WheelRight return

WheelHorzHook(nCode, wParam, lParam) { global mhook Critical if (wParam = 0x020E) ; WM_MOUSEHWHEEL (Vista-only) { if (delta := NumGet(lParam+0,10,"Short")) { if (delta<0) { SetTimer, WheelLeft, -1 return true } else { SetTimer, WheelRight, -1 return true } } } return DllCall("CallNextHookEx", "uint", mhook, "int", nCode, "uint", wParam, "uint", lParam) }

share|improve this answer
    
Ah you got it to work? Awesome! –  Ivo Flipse Jul 29 '09 at 13:19

From http://www.autohotkey.com/docs/Hotkeys.htm

Some of the most useful hotkeys for the mouse wheel involve alternate modes of scrolling a window's text. For example, the following pair of hotkeys scrolls horizontally instead of vertically when you turn the wheel while holding down the left Control key:

~LControl & WheelUp::  ; Scroll left.
ControlGetFocus, fcontrol, A
Loop 2  ; <-- 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

~LControl & WheelDown::  ; Scroll right.
ControlGetFocus, fcontrol, A
Loop 2  ; <-- 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
share|improve this answer

Here's an AutoHotKey script to do it using shift and (presumably) native mouse wheel scroll commands:

; Shift + Wheel for horizontal scrolling
+WheelDown::WheelRight
+WheelUp::WheelLeft

This is taken directly from https://gist.github.com/cheeaun/160999.

Keep in mind that a lot of applications, including Microsoft applications, don't support horizontal mouse wheel scrolling. (I believe the feature was only introduced in Windows Vista.)

share|improve this answer
    
Thank you, works great in Visual Studio! Too bad it doesn't work in Excel 2013 and Google Chrome. –  cheeesus Jan 23 at 9:23
    
@cheeesus, for me, in Windows, Google Chrome actually has built-in support for horizontal scrolling. Even without the above script, I can hold down Shift and scroll the mouse wheel to scroll horizontally. –  Sam Jan 23 at 21:56
    
Perfect! This is the best answer here, simple and easy. For those who are new to AutoHotKey, here are the steps: 1) Download and install AutoHotKey from autohotkey.com 2) Right click on your desktop -> New -> Text Document -> Make a file called "myscript.ahk" 3) Copy-paste the script from the above -> Save the file 4) Right-click on the file -> Run Script 5) Small H-icon should appear to your taskbar notification area, and now "Shift+Mouse Wheel" should produce horizontal scrolling –  np8 Oct 13 at 11:57

There is a way to do this in windows with the right mouse. I have a mouse with a scroll wheel that has a jog left/jog right button integrated right into it. Simply pushing the scroll wheel left or right will move the contents in the desired direction. I have the Logitech VX and I have been very happy with it.

The VX also allows you to configure the buttons differently for every single application if you were so inclined. This level of customization is very nice to have!

share|improve this answer
    
The Microsoft Wireless Laser Mouse 5000 ( microsoft.com/hardware/mouseandkeyboard/… ) has this functionality. –  Travis Jul 27 '09 at 17:36
    
You are correct! I used to have that mouse before I upgraded to the VX. The VX has two very nice features which is why I upgraded. It has a flywheel on the scroll-wheel that spins for 7 seconds. The other nice feature is the USB dongle for the mouse actually fits fully inside the device, so it is very difficult to lose the dongle. –  Axxmasterr Jul 27 '09 at 17:51

In some Windows programs shift does scroll horizontally (eg Windows Explorer).

In other programs such as Internet Explorer, Firefox and Excel holding down the scroll wheel button and moving from left to right will scroll horizontally.

share|improve this answer
    
Chrome seems to have built-in Shift horizontal scrolling, too. –  Sam Oct 23 at 2:10

After some looking around, eventually found a way (using AutoHotKey) that works in Excel and everywhere else, without obviously breaking anything (adapted from a couple of different solutions on the AutoHotKey forums, though I didn't record sources so can't give appropriate credit sorry).

MS Excel seems to have some strange ways of handling it's user interface (though somehow, after many years of seeing what the MS Office developers have given us, I'm not that surprised). This script seems to work pretty much everywhere except MS Word - if anyone can solve that, then let me know! It's probably something like finding out the window class for Word and coding for it specifically like was done with Excel (just with a different set of key bindings).

#Singleinstance Force
#IfWinActive ahk_class XLMAIN
+WheelUp::
SetScrollLockState, On
SendInput {Left}
SetScrollLockState, Off
Return
+WheelDown::
SetScrollLockState, On
SendInput {Right}
SetScrollLockState, Off
Return

; Everything except Excel.
#IfWinNotActive ahk_class XLMAIN
+WheelUp::  ; Scroll left.
ControlGetFocus, fcontrol, A
Loop 4  ; <-- 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 4  ; <-- 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
#IfWinActive
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.