Skip to content

Instantly share code, notes, and snippets.

@MiffOttah
Created November 23, 2019 00:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MiffOttah/346e5c23ae0ede788cbc1e771eeea553 to your computer and use it in GitHub Desktop.
Save MiffOttah/346e5c23ae0ede788cbc1e771eeea553 to your computer and use it in GitHub Desktop.
#Escape::Reload
$*MButton Up::
SetTimer, MBScroll, off
If not MBScrollUsed
{
Send {MButton}
}
Return
$*MButton::
Sensitivity = 15 ; how far it takes before the scroll happens
MBScrollUsed = 0
MouseGetPos, X1, Y1, , c, 2
SetTimer, MBScroll, 20
Return
MBScroll:
MouseGetPos, X2, Y2
If Abs(Y2-Y1) >= Sensitivity
{
MBScrollUsed = 1
SendInput, % "{Blind}{Wheel" (Y2 > Y1 ? "Down}" : "Up}")
MouseMove, 0, % Y1 - Y2, 0, R
}
return
@MiffOttah
Copy link
Author

Sorry for the hard tabs, I worte this on notepad directly on my "thin-client" thinkpad that needed this done to it and didn't feel like downloading notepad++ or similar just for the one file I'd ever write on here.

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