user3700613
user3700613

Reputation: 23

How can I bind my mouse wheel to scroll down with a key, and this key is.. (AHK)

So, basically, I play this game and want to be able to bind any key to my mouse wheel scrolling down, where a light tap would only scroll slightly (This is for a game, where it's precise. Like.. reeling in a little vs a lot.)

Anyway, I want the key to still be triggered even if other keys are being pressed, since I usually have to hold several keys in the game and reel (use the mouse wheel scroll down to reel) while holding these keys for advance maneuvers..

Any idea how to do that in AHK?

Upvotes: 2

Views: 14743

Answers (1)

Menixator
Menixator

Reputation: 125

Lets assume the key is x

If you want the key press to send only 1 scrolldown when it's held down:

*x::SendInput {wheeldown}

If you want the keypress to keep sending scrolldown as long as it's held:

*x::
While GetKeyState("x", "p")
{
    SendInput, {WheelDown}
    ;Sleep, 250 ; Add a delay if you want to increase the interval between keystokes.
}
return

And btw, you might want to make this a context sensitive hotkey( a hotkey that it activated only when the game is running.) or it will become a PITA.

You can find some info about it here

Upvotes: 4

Related Questions