Bug 160219 - Mouse wheel in konsole window is inconsistent, sometimes wraps
Summary: Mouse wheel in konsole window is inconsistent, sometimes wraps
Status: RESOLVED LATER
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-01 17:16 UTC by Mike
Modified: 2008-07-13 02:40 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike 2008-04-01 17:16:10 UTC
Version:            (using Devel)
Installed from:    Compiled sources
OS:                Linux

I have counted three different actions for the mouse wheel inside a konsole window, each depends on the amount of scrollback.

1. No scrolling

Mouse up = bash history
Mouse down = bash history

2. Small amount of scrolling (say 2 viewports high)

Mouse up = bash history + scroll up, this wraps at the top (ie. scroll all the way up and you are placed back at the bottom)
Mouse down = bash history, unless at bottom of scroll, in which case nothing

3. Lots of scrolling (over limit)

Mouse up = scroll up
Mouse down = scroll down
Comment 1 Robert Knight 2008-04-01 17:36:54 UTC
Cases (1) and (3) are by design.  Case (2) is a bug which was fixed yesterday.  If the scrollbar thumb has any room to move then mousewheel events scroll through Konsole's output.

The reason mouse up / mouse down goes through bash's history is because the terminal sends Up/Down key presses to the terminal on mouse wheel if it cannot scroll - see bug# 159340

Comment 2 Mike 2008-04-01 17:56:45 UTC
Bug 159340 says that each mouse click = 3 presses of the button which is not very useful for bash history.

Could this feature be disabled for bash?  Or maybe configurable?  Comment #2 on that bug sounds like a better solution it also shows that you are within the application rather than in your shell as before.  Scrolling whilst watching top looks strange and if that could be put into a special frame then it would not scroll.
Comment 3 Robert Knight 2008-04-01 18:33:00 UTC
> says that each mouse click = 3 presses of the button which
> is not very useful for bash history. 

Indeed not.  It practise it depends whether this accidental side-effect is annoying or not.  I haven't really run into it accidentally since implementing it myself.  

> Scrolling whilst watching top looks strange and if that
> could be put into a special frame then it would not scroll. 

If by "special frame" you mean the 'alternate screen', which is used by Vim, Screen and other interactive applications, then it is up to the terminal application itself to decide whether it uses it or not.
Comment 4 Mike 2008-04-01 18:42:10 UTC
Now that I know the symptoms, I have seen it before when scrolling through tabs when I accidentally move my mouse over the application area.

Would it be possible to do a few things?

1. Add some notification when the alternate screen is showing (something like the Ctrl+s notification - which I really like) - maybe something like 'You are now in an interactive application, mouse wheel is enabled'
2. Make mouse only send keypresses when in this mode.  Is the problem that less does not inform you that is interactive and this is a workaround for that?
Comment 5 Robert Knight 2008-07-13 02:40:12 UTC
> maybe something like 'You are now in an interactive application,
> mouse wheel is enabled'

That I'm sure would annoy a lot of people, myself included.

I'm going to stick with this as it is now.  If it gets reported again in future I might revisit it.