Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I currently use Cygwin and rxvt as my default terminal environment running bash. I would like to be able to scroll in the output window using the mouse wheel. Is this possible?

I realize there are (at least) two different use cases for this:

1) Scrolling in the scrollback buffer while in terminal/input mode (same as sliding the scrollbar on the window itself).

2) Scrolling in programs such as man and less, where using the up/down arrow keys.

Any solution to either cases are welcome.

Update I just realized case 1) is not relevant. This already works. :)

share|improve this question

1 Answer 1

I wrote an application to do exactly this in a HP-UX remote desktop app I use at work. It maps the mouse wheel to the up and down keys. Works great for me let me know if you like it...

Edit added links to the source and dll.

Disclaimer!!! I am not much of a coder(as my SO account will show) and haven't looked at this particular script since I wrote it I'm sure it badly written. Constructive input would be great but just telling me I suck isn't helpful!

data.joncopas.com/download/scrolled.dll data.joncopas.com/download/Scrolled2.au3 data.joncopas.com/download/Scroller.exe

share|improve this answer
    
Nice one. Do you mind sharing the source code for this application? It works with 'man' and 'cat', but it also interferes with rxvt's existing support for mouse wheel scrolling on the command line. When scroller.exe is running, it will send up/down keystrokes which results in scrolling the command history as well. This causes problems if you have "scroll down on input" enabled, in addition to destroying whatever command you were currently editing on the command line. –  Anders Sandvig May 22 '09 at 10:04
    
One solution could be to add support for only sending keystrokes if a certain key combination was pressed down while scrolling (i.e. Ctrl+Shift or something). Another approach might be to only run scroller.exe when you want to "scroll-enable" an application, kind of how the readline wrapper is used to give command history support for applications that don't have it already. –  Anders Sandvig May 22 '09 at 10:10
    
Sure its written in AutoIt script using a keyhook dll I found somewhere I will gladly share the source later today (I don't have it with me at the moment). The version of it I actually use is set up to only change the scroll behavior if Exceed (a Unix remote desktop app) has focus since its the only thing I use that for you could do something like that. Thanks for the interest! –  Copas May 22 '09 at 15:07
1  
Added source :) I hope it helps (and is worth a checkmark!). –  Copas May 22 '09 at 19:49

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.