3

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 2

5

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
2
  • 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! Jul 13, 2011 at 17:57
  • You can use Send,{WheelUp 10} to increase the scroll amount
    – Stevoisiak
    Jun 28, 2017 at 18:16
1

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)?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .