cygwin > xterm > bash > less : MouseWheel scrolling not working

1

I am trying to get mousewheel scrolling to work in less, within an xterm in cygwin with XMing x-server and fvwm window manager !

I hope I make sense..
I have tried rxvt, urxvt, urxvt-X, aterm, mrxvt without luck !

The only place this works is mintty.. but I won't use a non-X window just to get mouse scrolling in less.

Also, mouse scrolling in vim is working correctly!

Actually, mouse scrolling "works" but it is captured by xterm and not within less (meaning I see the previous commands from the command ilne when I scroll back)

And, last, I have tried a possible solution found online but it didn't work either.
the one where you echo -e '\e[?1000l' to turn on mouse capturing.

Am I missing something here? or it just doesn't work ?

Stefanos Kalantzis

Posted 2012-03-13T12:49:47.167

Reputation: 113

Answers

1

The reason this works in mintty is that it translates mousewheel events to arrow up/down keypresses when an application activates the so-called alternate screen but not mouse reporting mode. I think Gnome Terminal and KDE Konsole do this as well, but apparently the ones you tried do not.

In the mouse reporting mode activated with echo -e '\e[?1000l', special control sequences are sent for mouse events, which need to be supported in the application. The likes of vim and emacs do this, but less does not.

ak2

Posted 2012-03-13T12:49:47.167

Reputation: 3 387

I see.. So bottom line, I can't do this without a patch for less :) – Stefanos Kalantzis – 2012-03-14T08:46:30.430

I just found out the cygwin-ports and I added gnome-terminal which supports this! thanks for the info :] – Stefanos Kalantzis – 2012-03-14T08:47:24.127

0

This is not supported yet Enhancement 272 is still open (as of release 481). It is planned for future support, but has not been written.

hildred

Posted 2012-03-13T12:49:47.167

Reputation: 506