Skip to content

Instantly share code, notes, and snippets.

@envil
Created November 10, 2016 03:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save envil/d21a24744b68fda626b4444784f71c32 to your computer and use it in GitHub Desktop.
Save envil/d21a24744b68fda626b4444784f71c32 to your computer and use it in GitHub Desktop.
AutoHotKey - Fine Horizontal Scrolling for Windows
; 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
@numanair
Copy link

numanair commented Aug 4, 2017

I could not get this to work in Windows Explorer on Windows 10. Everything else I tested so far is working though.

@fe7ng654123
Copy link

I could not get this to work in Windows Explorer on Windows 10. Everything else I tested so far is working though.

scroll while pressing the right button of the mouse in Windows Explorer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment