Bug 159340 - "less" command o/p cannot scroll with mouse wheel in konsole
Summary: "less" command o/p cannot scroll with mouse wheel in konsole
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 1.6.6
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konsole Developer
: 157174 (view as bug list)
Depends on:
Reported: 2008-03-15 06:31 UTC by prakash
Modified: 2008-03-17 23:22 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description prakash 2008-03-15 06:31:21 UTC
Version:           1.6.6 (using KDE 3.5.9)
Installed from:    Compiled From Sources
OS:                Linux

I am using archlinux which is uptodate with kde(kdemod) 3.5.9,qt version:3.3.8b and konsole version: 1.6.6

The problem I face is,in konsole,I can't scroll with middle mousewheel through the output of "less"(pager) command .
For eg: "less /etc/group" where I have to use keyboard to scroll through.

In gnome-terminal we can scroll with mousewheel through the output of "less" command fine.

Even,in konsole when using vim or nano editors,I can use mousewheel to scroll through the file contents.

So,Please fix this issue with "less" pager in konsole.
Comment 1 prakash 2008-03-15 06:33:01 UTC
Here is a discussion on the same bug(or wishlist?):-

Comment 2 Constantin Berzan 2008-03-15 13:12:09 UTC
gnome-terminal does a funny thing when the foreground program is interactive (i.e. like vim, nano, less) and uses the alternate screen (with the scrollbar disabled): it translates mouse wheel events into up-arrow and down-arrow keyboard events.
Whether we want this behavior in Konsole, I don't know.
Comment 3 prakash 2008-03-15 18:46:32 UTC
well,Konsole already supports scrolling with mouse wheel on vim and nano like editors.then why NOT "less"?it is the most commonly used pager!
Please do enable konsole the "capabilities" :p Thanks!
Comment 4 Robert Knight 2008-03-17 18:34:56 UTC
*** Bug 157174 has been marked as a duplicate of this bug. ***
Comment 5 Matthew Woehlke 2008-03-17 20:36:44 UTC
I suspect this is a matter of telling 'less' to use the alternate screen instead of the primary screen... i.e. it depends on what TERM is set to. (At least that seems to be the case based on my experience with terminal emulation on Cygwin.)
Comment 6 Robert Knight 2008-03-17 23:22:01 UTC
SVN commit 786780 by knight:

If the terminal application is not interested in mouse events and the display's scroll bar is not movable then send Up/Down key press events to the terminal instead.

This makes it possible to scroll up and down in 'less' and other applications using the mouse wheel.  One key press is sent for every 5 degrees of mouse wheel rotation.  Typical mouse wheels operate in steps of 15 degrees which equals 3 lines scrolled per notch.  This default is the same as Vim's default mouse wheel scroll step.

As in gnome-terminal and others, this has side effects such as the mouse wheel scrolling through history results in the shell if the shell is run in a program such as screen.

BUG: 159340

 M  +36 -1     TerminalDisplay.cpp  
 M  +3 -0      TerminalDisplay.h  

WebSVN link: http://websvn.kde.org/?view=rev&revision=786780