I don't know much, but this forum[1][2] about mouse scrolling in Less
suggests that you can implement mouse scrolling (in the most popular
terminals) without reimplement ncurses inside the app. User ararus
writes:

"You can't make less understand mouse events. ... You can ... have the
xterminal program translate mouse events into suitable key presses.
Rxvt (and I guess Xterm) uses the sequences '\e[?1000h' and
'\e[?1000l' to turn mouse reporting on/off respectively. ... [That]
merely prints the raw escape sequences to the console. That's Phase 1.
Phase 2 is getting the relevant application to interpret those escape
sequences properly ... [because] While less has configurable key
bindings, the escape sequences contain the x/y coordinates on screen,
so less will need to be modified to understand the sequences."

Then ararus shows a patch to make less understand the control sequences.

----
[1] 
http://www.linuxquestions.org/questions/linux-software-2/less-command-output-i-cannot-scroll-through-it-627821/
(search for "\e[?1000h")

[2] 
http://www.linuxquestions.org/questions/linux-software-2/less-command-output-i-cannot-scroll-through-it-627821/page2.html
(search for "hack")



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to