# Keyboard shortcuts to send mouse scrolls to active window

I am wondering if it's possible to set up a keyboard shortcut to send mouse scrolls to the active window using for example AutoHotkey. I found this thread in the AutoHotkey official forum, but I believe it only sends scrolling commands to the window under the mouse (i.e. which, if I understand correctly, it's not necessarily the active window).

I'm thinking of using the Menu Key on my keyboard to do this, e.g.:

Menu Key + a -> Scroll up the active window
Menu Key + z -> Scroll down the active window


Any thoughts?

-

## 2 Answers

This should work fine. I don't have a menu key to test it with, though.

; Scroll up
AppsKey & a::
Send,{WheelUp}
return

; Scroll down
AppsKey & z::
Send,{WheelDown}
return

-
I edited your answer to add the required spaces between AppsKey and the a and z characters. The script works like a charm. Thanks a lot @Soumya92! –  Amelio Vazquez-Reina Jul 13 '11 at 17:57

The scrollwheel events are handled by the (active) window the cursor is over. If it's not over it, or not active, then the scrollwheel events aren't sent to the window.

What does work on an active windows that doesn't have the mouse over it, for scrolling anyway, is the cursor/arrow keys (up and down). Perhaps use those or, if they work but you really want to use Menu-A and Menu-Z then, perhaps remap the arrow keys to those keys via AutoHotKey (or alike)?

-