Emacs has a nice feature in the C-M-v keybind (scroll-other-window
in Emacs Lisp), which causes the other window in a frame with two windows to scroll (I haven't tried it with more than two windows) without switching to the other window. Is there a way to get equivalent functionality with Mac OS X toplevel windows (i.e. non-Emacs windows)?
In particular I'm interested in scrolling Chrome and iTerm windows, but a more general solution would be great. I assume I would have to install a hotkey app of some sort, but I'm not averse to that.
Best Answer
I don't know any way to get the second frontmost application or window with AppleScript, apart from something like this:
It makes the hidden and activated windows flash though.
With browsers you could use window.scrollBy():
Another option would be to simulate pressing ⌃F4, page up or page down, and ⌃⇧F4 by for example using KeyRemap4MacBook:
It also causes a visual glitch, and ⌃F4 sometimes selects windows from hidden applications.