Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

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
share|improve this answer
    
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! –  user815423426 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)?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.