Skip to content

Instantly share code, notes, and snippets.

@justinvh
Created October 10, 2018 22:34
Show Gist options
  • Save justinvh/64d229ac24ea37d1b4dfbcafd692cccc to your computer and use it in GitHub Desktop.
Save justinvh/64d229ac24ea37d1b4dfbcafd692cccc to your computer and use it in GitHub Desktop.
Horizontally scroll with shift + mousewheel
; 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment